You can use cgroups to cap the CPU usage of processes. Thus, you can make the shader compilation process use less CPU and produce less heat, in exchange for longer compilation times.
Requires: Linux, a somewhat recent kernel, possibly a package for cgcreate.
sudo cgcreate -g cpu:/slow # Create a CPU cgroup
sudo cgclassify -g cpu:slow $(pidof fossilize_replay) # Move all shader compilation processes to the cgroup
sudo cgset -r cpu.max='2000000 1000000' slow # Cap the CPU usage (in this case: to 2 CPUs)
You may need to rerun the cgclassify
from time to time.