Before Unreal there was RenderWare. Usually you choose between making an engine and making a game. And why not if its covers most of your use cases. But games like this are still being made, see Animal Well.
Yeah games being made on custom engines is still done, but probably hasn't been what the majority of companies at the AAA level have done since... the mid to late 1990s probably.