I made a somewhat improved snap-in hinge pin assembly. I should have used some longer bolts, but I didn't find any.
The assembly consists of two M3 20mm bolts, one compression spring and an aluminum tube to hold it straight:
The hinge pins are then snapping into the holes in the sides of the lid opening in the body: