The algorithms required to do it have been invented, so in a sense technical problem and has already been solved. Look up "end to end verifiable voting". Turns out that Ken Thompson's "reflections on trust" don't apply to these systems: you can run them on utterly untrusted hardware. They use cryptography or course, and like a lot of cryptography (eg, zero knowledge proofs) it first looks magic, but when you take the time to understand it it's just very clever.
Which leads you to the first difficulty: we are talking something more more complex than public key encryption. It adds steps and costs. Inventing a user interface usable by ordinary voters that masks the underlying complexity is major challenge involving the both a lot of new software and new hardware. Still, it has been done. https://arxiv.org/abs/1504.07098
Which leads to the next difficulty. It's not at all obvious to the layman how those extra steps and costs these systems require solve the problem. In fact unless you have an analytical engineering type mind, understanding it may well be beyond you. Which is a problem, at least in Australia, because the people who run the electoral systems are bureaucrats who expertise lies in building a system out of 1000's of unreliable newbies in an unfamiliar role that somehow reliably and incorruptibly counts and collates votes to deliver a timely poll outcome. When you reflect on it, it's an amazing feat of human engineering. These people seem to be acutely aware of sorts of ways humans can go wrong and working around it. Unfortunately they are bloody hopeless at understanding how computer systems go wrong.
It worth reflecting on the difference. Human voting systems are most vulnerable to what computer people call "retail failures". Retail failure occur at or near the ballot box - people voting twice, ballot box stuffing, boxes going missing. It requires many small interventions involving many people. Once the boxes get to the counting room there are so many people watching the process fraud becomes much less likely. Computers remove that central oversight - the thing that does the counting becomes an opaque box. Failures at the back end are called a "wholesale failures" to use the voting lingo. If you aren't very careful, a wholesale failure can mean a single person (a programmer) changes a couple of lines of code to in a way that Ken Thompson's reflects of trust tells us can be undetectable, to alter the outcome of an election. Wholesale failures look completely different to retail failures, but can be even more damaging that rampant ballot box stuffing.
The voting systems developed in Australia weren't a technical failure. They were used in real elections, and did work. But they failed nonetheless because in the end they weren't deployed beyond a few test runs. The reason they weren't deployed is the people who ran the elections where given two choices - one by a commercials companies and the one I've described which was developed by cryptographers and engineers in conjunction which disability groups. The first was very pretty, had a slick UI, and came with ironclad commercial guarantees about their robustness from the suppler. The second was more complex, cost more, wasn't so pretty, and came with a through cryptanalysis done by experts which spelt out all the failure modes and their likelihood. If you are a bureaucrat used to working with people is used to making reliable systems by accumulating interlocking promises from said people and utterly unfamiliar with making systems reliable with mathematical proofs - which would you choose?
So they chose the commercial system for mass deployment (I think there were all from US suppliers), and of course in doing so utterly pissed off the very clever academics and engineers who built the home grown system. They were so pissed off that they broke the commercial system on the first night with a wholesale attack - not literally, but demonstrated how they could have hacked it to obtain any outcome they wanted, without the bureaucrats in charge knowing. https://theconversation.com/thousands-of-nsw-election-online... The bureaucrats responded to this activism by labelling it "great marketing" and threatening to prosecute the academics and engineers who proved the commercial system was insecure.