I made sure that the plug and truck connection were clean and lubed before we towed it home and that the cap was holding the plug in place. The plug has always fit a little loosely in the truck connection.
I have thought about changing the pigtail and the truck connection and or the brake controller but then I think that it might just be a grounding issue or a loose wire that I haven't found yet.
Social distancing is keeping me from trying to tow a different trailer with a seven point plug right now. If I did that and had the same problem at least I would know that it is a problem on the truck end of it.