The captive enclosure for most scorpion species is a standard ten gallon enclosure. Rather than a regular enclosure you can also use a “breeder” enclosure which is not as tall and has the same amount of floor space. However, these make potential escapes more likely. Although I have never had an escape, I have heard of escapes. Again this is probably due to the fact that I use a regular ten gallon enclosure which I mentioned previously versus the “breeder” size.
The Arizona Desert Hairy Scorpion Hadrurus arizonensis environment in the wild is obviously a desert type of habitat which entails dry sandy loam soil. They are known to burrow in this soil extensively. To replicate this environment I use my personal standard of washed play sand at a depth of 3-4 ½”. In the sand I bury two toilet paper rolls on either side of the enclosure so that they are at a 45 degree angle with the mouth of the rolls just breaking the surface of the sand which acts as a pre-dug burrow.
Presumably you can use PVC pipe as well, I am not sure this would work as the pipe is smooth and the scorpion may not be able to climb back out. You may be able to apply some aquarium silicone to the interior of the pipe and then pour some sand through it, allow it to dry, and then place this inside. This would give the scorpion something to grip. I haven’t tried this yet with scorpions but I know it works for other species.