I noticed today that gcc has raised my i5 cpu to 96° by compiling an AUR package. The refurbisher BackMarket has assured me that it renews the thermal paste on all its machines, so I haven't checked it yet. Looking for software thermal protection for my venerable X220, I came across thermald.
From the debian wiki:
"The Linux thermal daemon (thermald) monitors and controls the temperature in laptops, tablet PCs with the latest Intel sandy bridge and the latest Intel CPU versions. Once the system temperature reaches a certain threshold, the Linux daemon activates various cooling methods to try and cool the system. "
I don't know if this is enough, or if a more complicated approach using cpupower will be needed. To be continued.
sudo pacman -S thermald
sudo systemctl enable thermald
sudo systemctl start thermald