That's not the gentleman's way of operating a door, but with the trashcan solution people also have to hold the door open somehow while disposing of the towel, unless it comes with springs that are adjusted just right so it stays open just long enough for people to sneak out in time.
Making the door open outwards is the right thing to do anyway with regards to fire safety, as far as I understand.
Of course, if you have the space to spare (without things getting too intimate) you can also just leave out the doors altogether, which is how many airports I've been to seem to handle the issue.
(I'd say an automatic bathroom door is overkill and a bit creepy, too, which probably is why I've never seen one.)