There are two primary facets to a functional democracy: trust and information. Democracy works best in high-trust, perfect information environments: people trust each that others are working in good faith and all have access to good information. It can work in low-trust, perfect information environments: even if people don't trust others, they are at least equipped with good information to make a proper decision. It can work in high trust, imperfect information environments: even if the information is wrong, the people involved at least have trust that the others they are working with are acting in good faith. It works worst in low-trust, imperfect information environments: people don't trust each other and they cannot rely the information to make decisions. This is the trajectory of the western world, particularly the US. At least one of these facets need to be fixed.
Democracy is the luxury of those who have peace, prosperity, and well disseminated information.<p>For a democracy that cannot be hacked, there would need be minds of a democratic populace who could not be hacked.