In that situation the open outwards/rope solution is indeed more save.
In your case you could design it such that you can’t close the door after use without unblocking the other one. Typically people would like to close the door to the bathroom after usage.