some brilliant people did just that with the pump that feed our house.
The pump shut off...half an hour later it worked again so someone wise installed a heat protection somewhere.
But on Aliexpress you can buy cheap heat "sensors" (it is not a sensor it just opens when it is too hot, but I don't know the correct name of it.) in steps 80,90,100,110, etc degree. Just glue one on the pump.
(most probably half a year later the pump doesn't work because that sensor is broken)