Holmes's point wasn't so much that people in the country are worse than people in the cities, but rather that evil is easier to hide when there's no one nearby.
Maybe. But the implication was clearly that any idea of the bucolic life of the countryside was a fraud. Here’s the passage from the story:
“Do you know, Watson,” said he, “that it is one of the curses of a mind with a turn like mine that I must look at everything with reference to my own special subject. You look at these scattered houses, and you are impressed by their beauty. I look at them, and the only thought which comes to me is a feeling of their isolation and of the impunity with which crime may be committed there.”
“Good heavens!” I cried. “Who would associate crime with these dear old homesteads?”
“They always fill me with a certain horror. It is my belief, Watson, founded upon my experience, that the lowest and vilest alleys in London do not present a more dreadful record of sin than does the smiling and beautiful countryside.”
“You horrify me!”
“But the reason is very obvious. The pressure of public opinion can do in the town what the law cannot accomplish. There is no lane so vile that the scream of a tortured child, or the thud of a drunkard’s blow, does not beget sympathy and indignation among the neighbours, and then the whole machinery of justice is ever so close that a word of complaint can set it going, and there is but a step between the crime and the dock. But look at these lonely houses, each in its own fields, filled for the most part with poor ignorant folk who know little of the law. Think of the deeds of hellish cruelty, the hidden wickedness which may go on, year in, year out, in such places, and none the wiser. Had this lady who appeals to us for help gone to live in Winchester, I should never have had a fear for her. It is the five miles of country which makes the danger. Still, it is clear that she is not personally threatened.”
This is a great expose on the mindset of Holmes. Whether or not this is anything more than a rhetorical argument, I don’t know. I suspect that wife-beaters as easily survive unknown and unchallenged in the city as in the country. A plausible argument can be made that cities are the worse for such things. We know today without a doubt that city dwellers (the same, it must be said, for suburban dwellers) tend to know little about their neighbors, or want to.
I like this passage. I’m just calling bullshit on it. Conan Doyle's idea that urban crimes tend to get reported because there are so many neighbors at hand does not match reality. City dwellers are well known for scores of them watching from their windows as a man is beaten to death and doing nothing about it.
And the country has no dark alleys to hide in. Cities are full of them. Cities make it far easier to hide vile acts and persons.