Regarding exhaust waste heat, that's a function of the speed of combustion, and the expansion ratio (which is the physical geometry of the engine).
Here's a simplified example:
You add air and fuel to a cylinder, close the valves, compress it, and combust it. Let's assume the full energy of the fuel is released.
https://journals.sagepub.com/doi/ful...55/2012/931584
Sage Journals estimates combustion gases may approach 3000 kelvin at the point of highest compression, which is a hair under 5000F. This is easily hot enough to ensure any remaining fuel is vaporized and burns. Gasoline does not remain liquid at 5000F.
Assuming we can pull 40% of the useful energy out of the combustion gases, that's still 3000F. If an engine has a compression ratio of 11:1, once you expand that to one eleventh of its original volume, it's still close to 300 degrees. And, unfortunately, these hot gases spend a significant amount of time exposed to the relatively much colder pistons, cylinder walls and cylinder head, where much of the usable heat is lost, conducting through these.