An election system is an agreed mechanism for an electorate to select its representatives. Elections do not work if the electorate does not accept the results, so the electorate has to believe in them. Elections share that old cliché with justice: not only do they have to be fair, they have to be seen to be fair.
If people believe an election is true, they’re more likely to accept unpopular decisions made by their chosen representatives. I believe that in non–democratic systems, unpopular decisions made in difficult times will make a proportion of the population even less enthusiastic about the system they’re in, and any contribution they make to it. For example, economically, they’ll do less work, or produce lower quality results, or both. This damages the economy; so increasing the feel bad factor, reducing enthusiasm further, producing less good work, and so on. Worse, if a people really dislike a system and its leaders, they may resort to violence to change them, causing social, industrial and infrastructure damage. Subsequently, resources which could otherwise have been spent developing the economy will have be used on damage repair. This is, of course, a desperately simple analysis, but I believe it’s generally correct.
An electorate selects a government, so if they don’t like the results, they’ve only got themselves to blame. They’re less likely to take more extreme measures. Furthermore, they know that, soonish, they can get rid of the government. There’s no need to resort to violence, and there’s less likely to be a serious reduction in enthusiasm because things’ll get sorted after the next election. Thus democracy dampens the negative consequences of unpopular governments.
Of course, this is a dreadful simplification. For example, there are many groups within an electorate, some of whom may strongly believe that their opinions are not represented by a system. If they don’t believe, their dissent will not be dampened. Such groups are far more likely to resort to other means to change things, which is one reason why democracies can have guerilla movements and even civil wars. So a more sophisticated democracy will cater for minorities, apparently give them special representation, to keep them on board. Indeed, any pragmatic political system, democracy or otherwise, would do something similar.
This is why I believe, in a non–democracy where things are working well and the population supports the government, then the economy is likely to do as well as any democracy. Indeed, it might do better, because it might not have the baggage of democratic checks and balances slowing things down. It is in times of trouble, when people do not support their government, that non–democracies fail. It is not a coincidence that the great economic powers are democracies; they have smooth changes of power, there is less negative economic feedback, they’ve kept more of what they’ve built.
All this shows illustrates why the mechanism of the democracy, the election process, must hold the electorate’s belief. If people do not believe, their dissent will not be dampened. To believe in the election system, you must see that it works. Furthermore, it must actually be fair; discovery of rigging is not likely to encourage further belief.
So whoever is running an election must do their utmost to ensure that it is fair, and is seen to be fair. They must do everything in their power to prevent the perception of failure. People must believe in their system. People must believe that anything used in the system works. The doubts of influential people, particularly candidates, must be soothed.
But the most important people in the democracy are the electorate. Those running an election work for the electorate. Everyone else, especially candidates, are secondary to the electorate. It is vital that the electorate believe in an election. It is not so important that the candidates do; if a candidate does not believe in the result, but the electorate do, then that is much less of a problem than if the candidates believe the result but the electorate doesn't. It is the electorate who make up the society and economy, not the candidates.
This is why I, a computer programmer and an ex–(political party) returning officer am against depending on election software. And if you do have to use it, make sure everyone has the opportunity to go through the program (the source code), that any problems are found and fixed before it’s used, that it’s blatantly obvious that the program that’s running is that produced by the source code (the best argument I’ve ever come across for using a real time source debugger in a runtime environment), and that there’s a backup non–technological mechanism should confidence in the technology fail catastrophically.
But remember, always, the person running the election represents the electorate, not the candidates. Always be aware of any problems, and if they effect neither the result nor belief in the result, ignore them; candidate scrutiny is important for bringing your attention to problems; but they have their own motives, any solution they propose might just be more than it seems. Obviously, the methods you use for fixing actual problems and imagined problems are very different, but the returning officer needs to be armed with both sets of skills to ensure that both types of problem are dealt with.
As an aside, I am aware of a number of efforts to set up open source election software. They all seemed to suffer from a misunderstanding of election systems. As I said earlier, an election system is an agreed mechanism for selecting representatives from an electorate. It is far more that just a way to count votes. Election systems ideally reflect the values of the electorate, although usually they actually reflect a compromise between the electorate and the values of the powers-that-be paying for them. This may mean the system contains odd rules reflecting things important to the electorate, such as ensuring particular types of candidates are more likely to be elected. They will often specify exactly how votes are to be counted. No election software should make any assumptions on these matters, which is why any election software that insists on using any particular counting mechanism, system or structure is a waste of time.