"Heat treating" is a broad term and the temperatures that this could refer to vary considerably. Hardening vs. tempering vs stress relieving of steel covers a wide range, and that of aluminum a different range.
The temperature of metal parts in an engine would vary depending on the shape and position in the chamber. I assume something that protrudes into the chamber, like a spark plug, would run the hottest.
In addition to heat-treating issues, you can get distortion due to heat at much lower temperatures. And, all metals will weaken somewhat as the temperature goes up, even if you haven't reached heat-treating temperatures.