Abroad I've had all sorts of silliness, including having to climb under and over barriers in Spain with an Interrail pass. I always had my (back then, paper) pass in one hand in case the
Seguridad appeared out of nowhere with batons in hand.
Back in the UK - I recall only one being faced with an unmanned gateline and a ticket that didn't work, which was at 4am at Wembley Central back when London Midland called first thing in the morning. I shouted in the direction of the office at increasing volume until someone sauntered out.
From my own work though, it was a huge no-no to leave a gateline unattended (no remote ones, either). Technically speaking you had to have someone a certain number of seconds from the emergency plunger at all times.
Are ticket barriers linked to station fire alarms and do they automatically open if the alarm sounds?
If so this would appear to solve any concerns about entrapment in an emergency.
Yes, and from experience it takes a damn age for them to turn back on afterwards.