I ride BART when I visit San Francisco and would NEVER think about entering the restrooms! There are enough "characters" hanging out at the Powell Street station that I tend to keep myself in public, populated areas. Are my impressions correct?
The Market Street restrooms have been closed for years. But in general your observations are correct-BART restrooms are really nasty. See also BART elevators.
I didn't think BART had any restrooms, at least in SF. In the Market Subway, they send you to the Westfield Mall at Powell.
They have them in the underground stations, but my understanding is that they have all been closed since 9/11.