You can take the lock above and a 2" ball. Cut the shank off the ball, When you unhook from the truck place the modified ball into hitch of the trailer and place the lock on.
I haven't tried it, but I'm wondering if the coupler adjustment nut will back off enough to let that ball drop out of the coupler, thereby letting a thief lower it onto their own ball? I ask because I once towed someone else's trailer that had never had the nut tightened, and while towing, the latched coupler lifted off the ball!
For when I am unhitched, I have another lock mechanism that I use; it has a U-bolt over the coupler that locks into a platform with a faux ball on it. This locks around the coupler, slowing down a thief intent on stealing it.