I think either you're confused about the wiring, or perhaps something isn't quite making the trip from your brain to words to my brain without a breakdown.
A four pin trailer connector would not be used to charge the battery or power anything in the trailer other than the running/tail lights, the stop lights, and the turn signals. There is no constant power available on the connector--if the lights and brakes and turn signals are off, there is no power at all to any of the pins. The 7 way (and some but not all 6 way) trailer connectors do have a constant 12V power feed, but it would not provide sufficient power for any but a quite small inverter.
Usually the inverter would be connected to the trailer's battery with heavy cables, hopefully short ones, and the battery would also be connected to the breakaway switch for electric brakes, and of course to the other trailer house loads like interior lights etc. The lights and so forth often are controlled by a main shutoff switch of some sort. That said, the sky's the limit for how the wiring could have been mucked up by a previous owner of a used trailer.
Are you maybe looking at a common ground connection? Do you have 12V power in the trailer when connected to a tow vehicle and none when disconnected, or are you just trying to trace the wiring? Does the trailer have brakes, and if so what activates/powers them?