Is it safe for baseboard water heater power supply to run insulated wiring over heating element?
To me this looks like an aftermarket repair to add or replace the control voltage. As far as a shock hazard it is low voltage so that is not a big issue but the wire does not look to be high temp but is hard to tell. There would be a code issue using this plug in transformer to power a permanently installed device.