From my own experience working for Northern, the only 'lock-up' station I dealt with was Glossop, although this has changed since then. The late-turn had to wait for the last train from Manchester Piccadilly to arrive just after midnight and lock the doors to the platform behind the exiting passengers, before locking the entrance to the booking hall on their way out. I can only remember the last train being even slightly late the odd time, but I do recall leaving a chap on a bench on the platform who had nowhere to go on a foul night - he promised he would leave before the trains started running at 6 by climbing out over the fence onto Howard St, and as I didn't hear any more about it, I assume he kept his word.
Obviously there would be a panic if the booked early-turn rang in sick or did not turn up for any reason. I was summoned from Hadfield to open the doors at Glossop one morning, but returned to Hadfield as the emergency key set only covered the platform doors, not the booking office. Rochdale has had occasional instances of being locked in the morning due to staff sickness, I could probably find news items online somewhere about it.
All the other stations I worked at had a night-gate to allow access when the ticket hall was closed, which was usually supposed to be locked during the day. I did once forget to open it one evening at Reddish North when I had closed the booking hall to mop the floor, but some hammering on the door from arriving passengers soon alerted me to my error! As I had to leave via the gate myself, I would have realised a few minutes later anyway, but there were a few stations where it would be possible to leave without using or even passing the night gate - Romiley springs to mind.
Incidentally, re 'wrongful imprisonment' I was told under no circumstances to lock a waiting room with somebody inside, even temporarily. If people refused to leave when it was locking up time, phone Control and if neither Security or BTP were able to respond, leave it open and make sure I left the station safely - I never had to put it to the test, fortunately.