story
I was thinking about what I said about the Carnot cycle and maybe it wasn't quite accurate. I tend to think about the world through a first-order effects lens. So the easiest way to explain why a turbine is usually more efficient than an internal combustion engine is that the turbine runs at a much higher temperate.
But the gasses in an internal combustion engine can reach a fairly high temperature as long as it's beneath the sag temperature of the metal block (otherwise you get warped valves). There was a lot of nonsense in engines before fuel injection attempting to prevent preignition when the mixture passed by the valves (in order to run as lean as possible, which caused excess heat) that I always thought was pretty silly.
Also there was a lot of work in the 80s and 90s to make ceramic engines in order to run at a higher temperature that never went anywhere as far as I can tell. They would have been lubricated by graphite and basically last forever. I think they were abandoned due to brittleness, but they would be great today with a continuously variable transmission or as a generator running at constant RPM like with locomotives.