Looked closer at these wires. This is indeed a sensor, but not a thermostat, rather looks like it is an ammeter mounted on the transformer coils. The sensor's wiring runs into the IC controller's sense pin, which uses the sensor's reading to determine if it should shutdown the PWM for overcurrent protection. And that could be exactly what is happening!I would check what looks like a thermal fuse (1A/250V?) that is taped to the yellow tape on the transformer. I've had one of those go due to "stress", and not thermal issues.
While this amp sensor certainly could have gone bad, it also could be doing its job correctly and alerting the IC that there is a short detected in the transformer, which is one of the likely things that we suspect could be the problem with the power supply. Bypassing the sensor without first proving that it is actually not working is therefore probably a bad idea.