If UE5 requires deep understanding for a game made by it to not run like a turd, then its a bad engine, there is also threads on the UE5 dev forums, where UE staff are marking performance related issues as a wont fix. The engine is definitely a big part of the problem. But I agree its not all of the problem, dev's have got too used to using these type of tools, and effectively can no longer do low level coding. Just build with tools instead, this applies to most software now, not just games.
Its amazing in a bad way how so many simple apps now days need so many cpu cycles to run, its just very bad unoptimised low level code, prioritising development time over run time performance and resource usage.
Not sure if I have ever en played a single UE4 or UE5 game that runs well, indie games tend to run fine, but the ones I have played dont use UE. UE seems to be mostly popular for big name titles.