I used old panels as J boxes in the past, and used adhesive, or screws on the cover to keep the door from opening. Now I usually run conduit to a deep 4X4. It's usually not NM, so there are no ground wires to deal with.

Dave