In a constitutional republic your rights are (in principle) protected even if every single citizen personally or privately disapproves of you exercising your rights. In a democracy, you need to go along with the mob, or they will turn on you. Republics protect vulnerable minorities from exploitation and attack, but they also stop aggressive intolerant minorities leveraging victimhood into power.
Voting is merely a mechanism, a bit like the press that makes a newspaper; it's not something that is associated with either a democracy or a republic (or even a totalitarian state). Just like how the press can work for freedom or fascism, voting can be used to different ends.
In a republic, you aim to minimise the power of the state, so the primary role of voting isn't to get good government, but to stop bad government. In a democracy, voting is used to accumulate power for factions, and circumvent free will; it's inherently violent. Totalitarian "voting" gives an illusion of choice.
In perfect understanding explained so clearly, thanks Martin