On a push trailer with 1 wheel (simplest, lightest, narrowest, cheapest, easiest to build) you want a u-joint type hitch that allows the trailer to turn and go over bumps but not to be able to flop over sideways. You want it to lean only when the bike leans.
electricbicycletrailer.com Open, then click "learn more". Here's the best design I've seen for a seatpost pusher trailer hitch for a single-wheel pusher. It's simple and strong. Like most seatpost hitches, your frame must be small enough for you to reach your pedals when enough seatpost is exposed to accommodate the hitch.
Look at the picture of the hitch at the bottom of the page, then watch the video at the top of the page. He removes the seatpost, inserts it through the hitch, then reinstalls the seatpost into the frame. The hitch is free to rotate on the seatpost to allow the trailer to turn. The hitch needs only a horizontal hingepin so the trailer can lift over bumps.
A quick release seatpost would be best for this hitch.
The seatpost part of the hitch should be made of wood or plastic which could be bored through with a spade bit. Metal would erode the seatpost unless complicated with bushings/bearings/sealed lubrication etc. The ideal substance for the seatpost block would be UHMW (ultra high molecular weight) polyethylene available as industrial surplus offcuts on eBay.
Below is my version of a hitch that works like a u-joint and adapts to a regular upright diamond frame bike or a recumbent.
Click twice to enlarge text to legibility. If you have no need to accommodate a recumbent the yellow portion could be one piece. Two pieces are necessary for a recumbent seatback which can't be inserted through the hitch like a seatpost can.
If you insist on 2 or more trailer wheels, any simple hitch will do that flexes in all directions, so the bike can lean independently of the trailer. This could be a piece of tire sidewall wrapped around the seatpost and bolted together, then bolted to the tongue. You could use an air hose quick coupling or one of very many hitches from bike & motorcycle trailer plans you can Google or find with a search of this forum.