I've been making these for almost twenty years.
They're simple most of time to make. Easy to lock. And if they're made right, relatively horse resistant.
Here's shot of the gate unlocked.
I start off with a piece of one inch channel twelve inches long and two pieces of three quarter inch pipe about an inch and a quarter long. The pipe is welded to the ends of the channel.
One inch channel is also perfect for making hinges. It gives you the space between your post and female hinge. It also gives you more welding area. I've had few failures. You can also prefabricate some ahead of time so there's less time doing it on site.
This particular gate will be rarely opened. That's why I used the five eighths inch cold rolled shaft. If it was a gate used daily I would have used three quarter inch stock. The three quarter will rust up and lock down without frequent use. So the choice of which shaft material to use involves usage.
This one I intentionally went to TSC and purchased three different sized shoes. A pony shoe for the latch post and the shaft shoe is one size larger than the lock shoe attached to the channel.
If you used shoes of the same size for the shaft and channel there'd be about a quarter to a half inch offset. It just wouldn't look right. If your shoes are the same size then you need to trim the channel one quarter to an half inch depending upon shaft material.
Sixteen to eighteen inch shaft length seems to work fine for these latches. The one tricky part is the little barrier that doesn't allow the shoe to slide sideways without being lifted up.
The way I make these is I make a horizontal cut along the pipe length cutting about a third of the pipe diameter and a half inch deep. A perpindicular cut to that cut gives me a tab that's shaped right. It's welded to the channel.
This tab is very important. Especially around horses. They open latches by worrying them. When the two shoes, channel and shaft, match up almost perfectly it's harder for the horse to grab just the shaft one. Much less to grab just the shaft one and then lift it high enough to slide it sideways to unlock the gate.
There is another advantage to this set up. One can look at the gate and tell if it's unlocked or locked by counting the shoes. If only one is visible then the latch is in the locked position, two of course means it's in the opened position.
A common padlock can be put across the two shoes and one now has a locking horse shoe latch.
That's the reason for the tab.
To open the gate one has to lift the shaft shoe almost a hundred and eighty degrees to manuever it past the tab.
A chain isn't necessary. All but the smallest shanked locks fit over the two shoes easy.
I also have a tendancy to overthink things.