I have a enclosed cargo trailer that I use daily for work and one day I started getting the "trailer disconnected" warning and it ended up being an issue in the electric brakes themselves. I had never serviced them so I just bought complete new assemblies and put them on and the problem was gone.
Jeremy