The old Cold War Communist system was pretty good. Essentially, having control of the system, they controlled who appeared on the ballot.
Your fictional country might simply be highly corrupt, and the counting of the ballots might be under control of a politically-beholden elections commission.
Your country might have highly Gerrymandered districts, so that “favored” regions get one representative per 10,000 votes, but “neglected” regions only get one representative per 40,000 votes.
Voting registration might be limited, so that, in favored regions, one person in 12 is registered to vote, but in neglected regions, only one person in 18 is registered.
The voting process itself might be complicated, or deceptive. There might be a requirement, which not everyone knows: you have to mark “Option C” in a menu of options for your vote to count; anyone who fails in this, or chooses any other option, is only casting an “advisory vote.” Insiders know to choose “Option C” but most of the rest of the voters don’t.
Voting might be so complex, it takes 90 minutes to do. Poor people would be less likely to devote the time, while the upper classes have nothing better to do with their time. Also, less educated people would be more likely to mess it up and invalidate their ballot.
Voting might take place at the workplace, not at home. This would concentrate votes according to working class.
The government might sponsor lots of political advertisements, thus swaying the electorate by a propaganda barrage. The loyal opposition, denied government funding, can’t spend as much and falls behind.
There might be a poll tax. Poorer voters would be less likely to want to spend the money. And there might be fewer polling stations (thus long waiting lines) in neglected districts.
First Estate involvement: the church might favor one candidate over another, and preach sermons which persuade people how to vote. (Similar to advertising.)
A “Senate.” The country might be divided into districts of unequal population, but each district elects a fixed number of representatives. Thus, small districts are better represented, per capita, than are large districts. (Wyoming and California each get two Senators.)
Preferential Balloting: in an “instant run-off” process, everyone would vote for the slate of candidates in preferential order. I like A as my #1 choice, D is my #2, E is my #3, B is my #4, and C is my #5. Whoever gets the fewest first-place votes is eliminated, and his ballots are reassigned on the basis of his followers’ second choices. This continues through subsequent rounds of eliminations until someone gets over 50% of the vote. The problem is that this system is highly subject to manipulation, and suffers from “dependence on irrelevant alternatives.”
(Even though candidate X cannot win, as he has far too few first-choice supporters, if he is in the race, candidate Y wins, but if he is not in the race, candidate Z wins.)
Somewhat related to that, the John Anderson/Ross Perot/Ralph Nader problem. A candidate splits a party or coalition. If that can be arranged as a conspiracy, it can prevent a majority from being represented.
Enough to give a small-d democrat nightmares.