I used to be a construction inspector for a natural gas utility, supervising contractor work crews installing gas pipelines, both distribution and service lines. For us, any hole more than 4 feet deep had to be shored, or sloped at a 2 horz to 1 vertical slope maximum. We were very strick with the contractor about it too.
One time, myself and the chief inspector (who was also the chief safety official for the utility) arrived at a site where the crew was running a new gas line up a road in the city. The trench was about 3 feet wide and about 4.5 feet deep, with about 8 inches of asphalt at the top layer (cut through the road). When we arrived we noticed the depth of the trench and were telling the crew foreman that it needed shoring. He was arguing with us that since it had asphalt on top, the dirt was not over 4 feet.
Well, literally as he was arguing, the sides caved in at one location, and trapped a worker. He fell onto his knees when the dirt hit him, and was buried up to just below rib cage or so. Fortunatly, he was still upright, so head and shoulders were up above the dirt. It took several guys several minutes to dig him out from that. If he had been knocked down flat on the bottom of the trench, he likely would have suffocated. And that is just with only 4 feet of dirt. Needless to say, several people got in big trouble over that incident, including the gas company inspector who was on-site before we arrived.
Just wanted to point out that even seemingly shallow excavations can be very dangerous. Please take care if you are ever in that sort of scenario. Remember, dirt weighs 100+ lbs per cubic foot. So with even only 2 feet of dirt on you, that is over 200 psf of pressure on every part of your body. Imagine having 200lb person stand on your chest. Now try breathing. And that only works out to about 100psf, based on the area of the footprint of the person. No weigh could the average person have 3feet or more of dirt on them, and still be able to breath, much less dig their way out.