I read a lot of science fiction back in the 1970s, and many of the political and social dysfunctions of today were forecast in those novels. But I can't recall this ever being the subject of any of the books I read.
In Heinlein’s “Friday”, America has balkanized and broken up into several separate countries. The Country of California only allowed unisex bathrooms. The movie version of his Starship Troopers had the troops showering coed, but I don’t recall that in his novel.