When I was around 6-8 years old, I was afraid of getting locked in places. Because I got locked (more like stuck) in an elevator and the lights shut off and I got locked in a bathroom. (But both times I got out quickly. But the memory of it didn't go away very quickly.)
Here is a joke that sounds similar to my experiences (similar in the way that I wanted out!!)
"What time does the library open?" the man on the phone asked.
"Nine A.M." came the reply. "And what's the idea of calling me at home in the middle of the night to ask a question like that?"
"Not until nine A.M.?" the man asked in a disappointed voice.
"No, not till nine A.M.!" the librarian said. "Why do you want to get in before nine A.M.?"
"Who said I wanted to get in?" the man sighed sadly. "I want to get out."