Another person who doesn't understand a damn thing about why the safety daemon is needed or how it works.
If you keep careful track of the audio going through the speakers and the energy in each frequency range, you can figure out exactly what the temperature is at any given moment and make sure it stays under the limit. However, this requires a ton of math.
Alternatively, you can just put a hard cap on the volume, such that no combination of frequencies could ever overheat the speakers. This is safe, but sounds like crap. It's a far, far less nuanced way to do things and results in restricting how hard you can drive the speakers far more than is actually nesisary.