I have had to access the electronics inside the enclosure on the rear of my cnc mill on numerous occasions. This generally meant supporting the electronics enclosure with twine whilst work was carried out inside the enclosure.
Recently I had a young bloke helping me and I asked him to hold the enclosure whilst I tied it up with twine.
He said to me " You silly old bastard, why don't you fit a hinge?" I had to admit that my method was indeed silly.
I had in my possession an old brass piano hinge that was a perfect length for the task.
The photos tell the story.