Yup, breakaway switch & battery on trailer.
On ours the power for the battery charger ran off the running light circuit. Therefor the lights had to be on for the battery to be charged. Yours is likely the same. If this is a commercial trailer, dot will ask you to demonstrate the functionality of the breakaway as part of their inspection.
We found the factory harness to be too small a gauge for our trailer, and bypassed it as well. We had three axles with brakes on them though.