I believe Benjamin Franklin once said," good locks keep your thieving neighbors from stealing your stuff".
This is how I've locked my new Andersen hitch to my old rails. The pins that come with the Andersen hitch have a hole in them for a safety pin, but no way to lock them. So I used one of my old hitch pins that has a groove in it instead of a hole and that allowed me to use the little gadget below to lock it all up.
I bought this little gadget many many years ago at an RV store and I've always used it to lock my hitch to the truck. The smallest part of the hole goes in a groove in the main pin. and the shackle of the lock goes in the big hole which prevents removal of the little gadget from the pin. Of course it's probably not that hard to defeat it so I think the whole point is to make thieves, and merry pranksters move on to someone else's trailer.