The trailer brake wiring does not go into the trailer wiring but is strictly powered by the tow vehicle. The emergency breakaway switch does use power from the onboard battery, but only if the breakaway switch is operated.
It sounds like you have a broken wire going to the brakes which just takes some checking for power at each wheel. If none of the wheels are getting power, then it will be between the pin box and the first junction where the wiring splits to the from axle. Another place that causes problems is the wires inside the axles can wear through the insulation and grounds out to the frame of the trailer.
LOOKS LIKE I WAS A SPLIT SECOND TOO LATE