Source a good quality, heavy duty, adjustable and lockable overcentre latch for locking the pivot arm to the chassis. Ideally the latch should be bolted into the chassis but can be welded if the latch is of mild steel construction.
If you are drilling and threading to bolt the latch to the trailer (recommended!), weld a couple of 6mm flatbar plates onto both the chassis and pivot arm before drilling and tapping, to give additional material for the bolts to screw into. Use serrated or spring washers and "Loctite Nut Lock" or a similar thread locking paste, to secure the bolts.
Check your local trailer parts supplier, trucking supply merchant or an online supplier for the overcentre latch. Buy the best quality you can afford.