PID for thermal protection
Simple PI where you regulate the temperature should do the trick. 

In normal operation, no overheat, your regulation loop saturates and provides full power to your system. If it starts getting too hot, the control loop does its job and turns the power down.

If your PID is analog, no problem, if it is in software, you will have to cap the I term to avoid the problem you correctly fear.