This is what the original phrase “write games, not engines” actually means. When you build an engine first, you are likely to implement things that don’t fit well with the games you’ll be making. By designing the engine at the same time as the game, your engine immediately has maturity by being used in a real project.
This is how I write my games, and although it’s slow, I am guaranteed quality software as a result.