Indeed. The "do not use in case of fire" signs on elevators today are there for a reason...
I don't think the starship should "lock down" automatically in the event of total power loss. Not if everything goes as planned; it would be better to have some bulkheads fall in place, but have multiple evacuation paths (corridors, airlocks, shuttlebays) remain available. However, it's possible that the disaster in "Disaster" caused a lockdown that went against the designers' intent, in that even certain supposedly inviolable emergency power systems went down and caused the emergency systems to stop behaving as expected.
It's also possible that most of the ship was actually perfectly fine after the disaster. Only the regions where our heroes were trapped were in any true jeopardy - but the audience couldn't know that, since the heroes couldn't know that, and the camera followed the heroes. Too bad that the ship-endangering containment failure could only be handled from within one of the jeopardized areas... A thousand extras could have been banging on the bulkheads from outside, trying to rush to help our heroes since they themselves were in no direct danger, or even inconvenienced much.