For example, most of the place names in Crime and Punishment are redacted, but it's so clear where everything happens there are walking tours in St Petersburg.
That is, the censor is some bored middle-class beaurocrat rather than a true believer. So all you need is to give the him plausible deniability so he can turn around to his bosses and say "Hey, he redacted the name, how was I to know he was talking about your mother."
Most 19th century was depressing and stagnant time wrt politics, so books drew immense public interest.
That said, op's example would be automatically censored by the author himself, since this language was unprintable in 1860s.
I don't know about the Dostoevsky's places, always thought it was a traditional trope - places named with the first letter are ubiquitous in Russian novels.
Edit: also, it's worth noting that much censorship was made to make books suitable for morally unstable or easily agitated demographics, like women, so sometimes the motives for a particular edit could be hard to relate from modern relativistic perspective.