I think for the type of game that he's working on ("a 2D physics sandbox game that lets you explore the galaxy"), a custom handmade engine might be far better than using one of the mainstream game engines. His game is in 2D, so the shiny 3D renderers that Unity and Unreal have won't really matter that much. And his game seems to contain lots of performance-sensitive physics and geometry code that needs to be tailor-made to his game, so the default solutions in Unity and Unreal will be probably be unusable (so they would need to be written from scratch anyway). The goal he's setting for is very ambitious even for a 2D game, and Unity/Unreal will probably limit him too much.
That said, I think many of the decisions towards his rewrite in Jai seems to come from him picking the wrong language (D) at the start. He should have sticked with C++ in the first place, even with all its warts and complexities. It's a proven language that has shipped countless games, have tons of tooling developed around it, and provides one of the biggest ecosystems available to a game developer (and unlike D, has debuggers that actually work!). And you can certainly improve compile times a lot by using unity builds, managing your header dependencies well, and not going too overboard with templates (though I agree this can become a major pain point, especially if you're using a laptop).
That said, I think many of the decisions towards his rewrite in Jai seems to come from him picking the wrong language (D) at the start. He should have sticked with C++ in the first place, even with all its warts and complexities. It's a proven language that has shipped countless games, have tons of tooling developed around it, and provides one of the biggest ecosystems available to a game developer (and unlike D, has debuggers that actually work!). And you can certainly improve compile times a lot by using unity builds, managing your header dependencies well, and not going too overboard with templates (though I agree this can become a major pain point, especially if you're using a laptop).