Trailer warning comes on if the indicator load is too high. I'd suggest either there's a problem with the trailer plug (perhaps a short in the back of the plug, maybe bringing the reversing lights on?) or one of the tail light sections/plugs has a problem. My left rear tail light has had an issue with the bulb socket that required replacement (Nissan did this for me, it was early on in its life). Since then I've had the occasional issue with the left hand tail light but unplugging it and replugging it has made the problem disappear for a considerable time.
I'd suggest checking the trailer plug after a visual inspection the tail lights are all operating normally.
I'd suggest checking the trailer plug after a visual inspection the tail lights are all operating normally.