Baler twine and/or snappy cords. Or both.
Baler twine around the hingey posty thingies to stop the round-overs being able to come off the posty-sticky-uppies. Snappy cords to secure the upper end of the opening end to a chunky staple bashed into the post there.
(Sorry, having one of those mornings when I have to describe what things do, their names having temporarily escaped me.)
And if that doesn't work, barbed wire wrapped around the bottom rung
All of the above for naughty native ponies too, except the last straw barbed wire has to be along the top bar. And some thick-skinned ones will still think that makes nice Stratch-Mes