Thermal diodes can make this possible.
Scientists may have developed a battery that can't overheat. The new lithium-ion battery automatically shuts down before overheating and then restarts immediately when the temperature cools.
In a recent study, researchers found that dinosaurs used nasal passages to keep brains cool, this was to avoid their brains from overheating.