"You've got a bad ground."
That's always the first thing I look at with trailer light problems, no exceptions. That being said, there are a plethora of other issues that can arise with trailer light wiring and the situation is exponentially aggravated when you're in and out of salt/brackish water frequently, whether you wash down thoroughly religiously or not. Even supposedly well-sealed, LED units give problems eventually.
I use my boat a lot, not a weekend warrior. In fact, I avoid weekends on the water completely three months of the year. I've been fighting this battle for fifty years and I'm sick of it, utility trailers, horse trailers, quad trailers and especially boat trailers. Just seems if there's a quality sending unit to plug into the flat-four outlet on the truck and lighting units that can be easily and securely installed, removed as necessary, it would make my life just a little bit better. I'm wondering if anyone is familiar with such a setup.