Penelope Leach had a paragraph on this in her baby & child book IIRC - just a general thing about visitors to places not understanding local risks, but specifically mentioning the risk of sand tunnels collapsing.
I work in the building industry - you are not allowed to descend an unsupported pit (for example if digging up the road) that is deeper than four feet/1.2m, i.e chest height on an average man. The idea being that if it collapsed your lungs and head would be free to breathe.
If I saw someone on a beach digging a 5 foot tunnel I would certainly have strong words - the phrase "Death trap" comes to mind (and I'm not normally the type to interfere). Sand dries out quickly in the sun and then will collapse like sugar. <shudders>