interesting problem...worst case scenario..what would the captain do? If the door has to stay and the FA can't come out, then FO and FA have to declare an emergency and land soon as practical.
Maybe we need to come up with a stuck in the bathroom code and have a passenger just slide the note under the door. LOL