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.
Here's a quote from [1].
"These “super ceramics” are as tough as metals, but they are also one-third as heavy and can operate at 2,400 degrees Fahrenheit—500 degrees higher than the most advanced alloys. This combination allows engineers to design lighter components for engines that don’t need as much cooling air, generate more power and burn less fuel."
2400F is about 1600K. If you plug this into the Carnot efficiency formula and use a T_cold of about 220, you get something like 86%. If they ever find a way to replace the silicon carbide they currently use with hafnium carbide, they can reach 90%
[1] https://www.ge.com/reports/space-age-cmcs-aviations-new-cup-...