"Pennsylvania is a classic case. After the 2000 census, Republicans, who controlled the state legislature, used powerful computers to draw bizarrely shaped districts — which were given names like "upside-down Chinese dragon" — that maximized Republican voting strength. They paired Democratic incumbents in a single district, so they would have to run against each other, and fashioned new districts where Republicans would have an easy ride. As a result, a state with nearly 500,000 more Democrats than Republicans has a Congressional delegation with 12 Republicans and just 7 Democrats" - New York Times Editorial - "Fixing Democracy"
And yes, the counting of votes shouldn't be in the hands of people with an interest in the political outcome. No problem with electronic machines counting votes, if they're reliable. They shouldn't be touch screen, they should give out a receit to the voter where that voter should be able to check that the vote is A/ Registered B/ Correct. The machine should also produce a printed log. (The machine shouldn't be made by someone who gives substantial funds to a certain candidate and not provide a single paper where the voting can't be counted afterwards, as is the case with a lot of electronic voting machines. All know that electronic slot machines are fixed to give favors to the casino. What say Electronic voting machines aren't fixed to produce a certain favor for one party or the other. Registering a blank vote for every 500:th vote on the "wrong" candidate, or something.
The biggest threat to a democracy is the lack of voters. In that infamous USA Presidential election of 2000, only 50% of the population saw it as their interest to use their democratic right of influence. The interesting thing isn't why those 51% voted. The interesting fact is what made the other 49% not vote.
My guess would be that a lot of those doesn't see a point in voting, because they have a feeling their vote aren't worth anything in the end anyway.
I know that a Presidential election might not be of interest to a lot of people, since it's a remote election. "Who cares about who is President? I'm only interested in the local politics", forgetting the fact that, who is President very much reflects the local politics in the long run.
Personally, I think the process is too hard and complicated, and too easy to control by those having an interest in it, in one way. Basically, the system are very open to manipulation.
No matter who you vote for, you should be able to know that your vote is counted and does have an influence in the end result/is reflected in the way things are handled in the future. That, I see as the fundamental idea of a democracy.
Many celebrate the ancient Greece for being pioneers when it comes to creating a working democracy, and a lot of things do look good on paper with their system. Every person having a direct vote etc. The problem is that only 5 - 10 % of the population was counted as persons, and having the right of voting. Only men were able to vote, and only "free" men, which basically meant only men owning their own land etc (The Lords), creating an elitistic society. In a modern democracy, every single citizen should be able to vote, being of a certain age. Usually it's 18, even if I would favor 16. Nobody of "wit", should be excluded. You shouldn't be judged if you're counted as people or not people.
Some 100 years ago, when transport and communication wasn't as obvious at it was today, it made sense electing people representing your vote, as well as counting the votes with different importance in order to stop regions from totally dominate on the cost of others. That is a good idea, in some cases, but it does complicate things too much, as well as not being needed anymore. The only result is that the election feel "remote".
No matter what country it is, not saying one country being better than another, since I think most countries has flawed democratic processes in one way or another.