Electronic voting will never be safe. A combination of electronic and physical systems might be the best. Like putting in your vote on a screen but also have a punched card that can be physically verified by the voter before submitting the card as well. Thus there is an easy electronic count and a physical card that cannot be easily hacked if there is a need for a recount.
But there are many ways to skin a cat, and even physical votes like in Venezuela can still be overturned if you have the corrupt men and men with weapons if you argue.