Usually only after they stop being democracies. It's rather difficult to repress people who can fire you if they don't like the job you're doing.
But in principle I agree, democracy on its own doesn't guarantee morality. There's such thing as the tyranny of the majority.