I thought I would make a possible diagnosis. It is likely that the electrical current for the hazard flashers is making its way back to the towing truck through the brake actuator coils through the controller. In operating conditions, the brake pedal actuates a connection from the B+ of the battery to the controller which regulates the current flowing through the brake servo coils to pull the frictions up the face of the trailer drums, actuating the drum bbrakesl. When the trucks brake pedal is released the voltage is removed allowing the servo coils to release.
Ordinarily when the hazard lights are active, the battery current goes through the lamps to the ground.
Now consider the case where the ground is defective between the truck and the trailer. I considered this unlikely considering the weight of the loaded trailer. Later, I have seen the rusted condition of trailer loops the hooks they are coupled with. If this truck and trailer have been expose to weather conditions, it likely the ground path is questionable. The usual work around is to have a ground bond wire going from the trailer to the truck in the connector plug. If the bond wire is broken or its terminals and corroded, there will be no ground.
In this case the current from the hazard lights will find a ground back to the truck through the brake servo coils, hence through the controller to ground. This would cause the trailer brakes to activate, causing the observed situation.