Even if it doesn’t, the problem still can exist.
A fictional example: a car’s cabin temp is climbing. That ambient heat has caused the battery temp of your iPhone to reach 80ºF, at which point it stops charging. As the external temp rises above 100ºF, your iPhone eventually
automatically powers down due to overheating. Perhaps the iPhone enclosure temp, including accelerated buildup via direct sun (‘baking’), is now above 115ºF. Even when the device isn’t generating heat, the device’s internal (i.e., components) temp can remain at damaging levels. In other words, the iPhone can’t actually cool itself down; rather, it stops heating itself, creating heat.
As an analogy, think about if after a run, you’re forced to rest in a sauna versus being allowed in an air-conditioned room.