This seems like a no brainer. Why not combine the elevator and bathrooms, so instead of simply waiting to get to your destination floor, you can relieve yourself at the same time.
It’s strange this has not happened yet. Even the signs for them (in shopping malls etc) look very similar and can sometimes be mistaken.

There would probably need to be separate men and women elevator-bathrooms, but that is not too bad of an idea anyway. The men's elevator could have urinals to save on space. And there should probably be restrictions so you don’t get a full sit down toilet unless you’re going for a minimum of 20 floors etc.
There will probably be a longer line for the women's elevator, and it might need to travel slower in order for them to get ready before they reach their floor.