CR and pump gas question

A physics observation (though I'm not a physicist). The whole idea of making more power in an internal combustion engine (is there an external combustion engine?) is to make more heat in the combustion chamber. That's the whole idea with nitrous, turbos, blowers, big cams and high CR, etc. The more fuel and oxygen you can burn in the chamber the more heat energy will be exerted onto the piston. Cooling the chamber takes away heat and thus power. However, if the mixture pre-detonates due to too much heat that can severely hurt power as well as parts. Bleeding off some heat will net more power but there may be better solutions than depending on the thermodynamics of aluminum.