I can’t believe it’s good practice to rely on retaining data in dev.
If the data is important, that work should probably exist in Production under more controlled circumstances.
I don’t know the full nature of what you are trying to do, but being opinionated, solutions should almost certainly be plugins that can be deployed anywhere and not even have to fully rely on a specific version of Discourse, nor care if specific data is pre-populated outside of seeding its own fixtures.