That happened to me once, in my dishwashing days working my way thru college. 1975. I was working in a large department store, in the basement restaurant, cleaning up after it closed, just an hour before the store closed. It was mop night, so clean up took longer than usual. This was practically the only time the closing guy didn't check on me.
Fortunately, the number of the guy who responded to security alarms was posted at customer service, so I was able to call him to let me out. He had just arrived home when I called.
Close to my situation...’cept couldn’t find a # to call so only solution was 911 and the cops!
When my husband was working at a Newberry store, this happened to him - in high school. A few years ago I was locked in to the doctors office building. They all went home while was sitting on the examination table in a paper gown. Christmas Eve. Glad I had my cell phone.