On cruise ships they have been working this out for a bit. There's a bin by the door. You grab the handle with your towel, put the towel in the bin while holding the door with your toe, and then exit. Ship's health propaganda points out that this will be the case.
Luckily, the bathroom is not the only location in the entire building with a trashcan