Well, that is unpleasant! There are folks that regress people to birth, and being born sounds unpleasant... similarly constricting? Past life memory of working in mines- sounds unpleasant. Seriously, mine work, not fun- people used to suffer all sorts of back issues walking stooped for miles, even crawling at times!
Assuming you could lucid dream, you could ask 'what does this represent' and you may be surprised by the answer. Usually the answer is helpful. Your subconscious know about you and your life, and it may be trying to get your attention, hence the nightmare.
Have you ever been so confined? I didn't know I had claustrophobia until they shoved me into a fMRI. They had quick solution that worked for me. They pulled me out and put a towel over my eyes. It worked! I was surprised that it worked, but apparently the weight on your eyes keeps you from opening them...
It's difficult to unpack dream symbols in this format. Dream symbols are not universal. Someone who is not afraid of snakes and work with snakes, if they have a dream of a snake it probably doesn't mean the same to someone who is afraid of a snake or was bit by a snake.
One thing I know about nightmares, facing them tends to make them stop. I have not had a nightmare since 16. Carl Jung, shadow work- run towards the darkness, the light's on the other side-kind of dream work. Using that metaphor, with the potential explanation above, you're in a narrow place, 'a drain pipe or hole' these things tend to lead somewhere, an out, an opening, a new place- almost like being born! It's scary because where you are (were) is more comfortable than the unknown of where you might end up... pipe or hole is a transition place. That's one way to unpack it. So hypothetically, if you and i were working on breaking this, I might suggest before sleep, saying "if I have this dream, I will emerge into the light of day!" If nothing else, you will now be engaging it instead of dreading it. And with a strategy in place, you might not have the dream again- but have that intention, be determined, even bring in some anger- "by god, if i have this dream, I will emerge healthy into the light..." Make a dream journal, and write that intention down. I hope that's helpful.