Electronic voting is a terrible idea. Lil' bits of paper with representatives watching the vote counters is a pretty solid system. There's no problem there that needs to be fixed.
I say this as a Canadian who has volunteered as an observer in federal elections. I know Americans have their thing going on, but seriously. Paper ballots all the way.
I have never volunteered to count or observe elections. However I am a professional programmer, and I absolutely agree, electronic voting opens up tons of new attacks, whereas paper voting "security" is basically a solved problem at this point
If code was impossible to make safe banks would still be doing manual labour and ATMs would've been phased out.
Financial transactions are logged and the logs maintained for a certain number of years. You can definitely use a similar system for voting when the stakes are low - local elections, for example. But an electronic voting system cannot be both secret and verifiable. In practice you make finding out how someone voted as hard as possible, and hope that a future government will not put in the effort to crack your system. All of which is completely unnecessary when paper ballots exist, and can be both secret and verifiable.
I actually question if direct democracy would be good, after the amount of exposure to typical voters I've had, lol. Representatives can be questionable, but at least they know what they're deciding on.
Autocracy is just completely awful and depressing, though. No doubt about that.