If you find yourself having to wash your underwear in the field as it were, it might be worth checking out travel underwear made for just that: Ex Officio and Shinesty makes some comfy stuff that washes well and dries fast.
This is from someone who has obviously never shat themselves.
I kinda want to get this printed on a placard or something...
Seriously though, some underwear (and some situations) are more washable than others, but you can absolutely get filthy stuff surprisingly clean with just some soap, water, and effort whether you're in the middle of nowhere and you have giardia or in the middle of a kegger and you have beer shits.
Trans people: I don't care which sportball team you play on or what bathroom you use, just wash your hands when you're done.
Whatever is in your pants is none of my business unless you're trying to make it my business (in which case, I'm flattered, but in a monogamous relationship, sorry).
Not exactly what you're after but William Gibson's Sprawl trilogy is pretty close minus the small population and only small parts of the population live in some sort of paradise. There's also Burning Chrome, which is set in the same universe but is a series of short stories. It's a dystopian near future sci-fi noir that is considered to have basically started the whole cyberpunk genre. Punchy writing, would recommend.
Kinda but some places are way worse than others (Hexbear, .ml, and lemmygrad come to mind as the most egregious, but I think Hexbear is actually gone now).
That was the first author that came to my mind lol