Isn't the traditional advice that if you try to write both a game engine and a game that you'll get neither?
Even in hindsight it's hard to judge whether building your own engine was good or bad decision, and we are nowhere near "the hindsight" level of knowledge.