I would start with the trailer wiring. If nothing found there check the wire bundle near the headlights. It passes through a bulkhead and has been k.own to wear and short out giving all kinds of strange symthoms. Good luck.
.wiring can be a nightmare.