A latch the horse can’t reach is my preference. But, if the horse can reach it, I’ve used a double latch: a safe stall latch that is easily fiddled by the horse (because it is safe, that first one in Bluey’s set of photos say) and a simple rope and snap looped around the adjoining door and post. Almost as fast as a single latch and good at foiling horses that are smart: they know they have opened the latch but the door still doesn’t open, they tend to give up, horses aren’t great at multiple step problem solving!)
My barn, built in the 1870s, has wonderful door latches for swinging doors: they are heavy (almost inch square) bolts of iron threaded through three equally heavy square loops, with an indentation at the closed end which matches the loop on the door: the bolt is a square cross section, four inches long, but the last inch in length which is engaged when the door is closed is a little thinner). The trick is that they are sprung every so slightly so when closed, that thin section is caught against the loop, and in order to open them, you have to push in against the door and slide it at the same time. The force required is substantial and the tolerances are very close, so a horse can play with the latch all day but it won’t move. I’ve never seen similar, it relies I think on the sheer weight of the iron.