I quite agree, if for no other reason, then it lacks a written, rational basis. Though there are many ways to go that way, none of them entirely satisfactory.
Probably the most legally satisfying is to have single person, any gender restrooms. But because many places have a greater need than single restrooms, a clever designer might create a segmented restroom, with public and private areas.
The public area would be more open and obviously monitored, for things like hand washing. Then each single person, any gender restroom would branch off it, as with stalls, but with a double door. The outer door would have the occupied/vacant indicator, then after a ‘vestibule’, an outer area for say a parent, accompanying their child, or an attendant pushing a wheelchair, to wait, the inner door would lead to the stall.
Do you realize the cost of retrofitting every restroom in America to what you just described?
Better (and cheaper) yet, just replace the door signs with images of the appropriate genitalia.