I've mistakenly locked all my dupes from being able to enter one of my rockets. I was attempting to make a door crusher to remove the carbon dioxide buildup inside the capsule when one of my dupes was able to build a mechanical airlock and lock it with an automation wire on the entrance door & then leave the capsule thus making it impossible for anyone to ever enter it again.
have a duplicant build a mechanical airlock & an automation wire on the entrance door of the command capsule. If the dupe builds the automation wire wile in the mechanical airlock the airlock will lock after they step outside of it. If they choose to leave the command capsule at this moment & there are no other dupes inside, then it it impossible to get back inside the rocket. because you'd need to deconstruct either the door or the wire to do so, and there is no one inside who can do that.