Democracy is in the counting*
*According to a quote I saw attributed to the playwright Tom Stoppard.
When I was a practicing IT security person I got annoyed at the relatively intelligent people** proposing 'cryptographic voting schemes' which, when analysed did nothing to prevent cheating.
I devised my own, Socially secure cryptographic election scheme (Electronics Letters, 23rd May 1991, pp955-957 / or digital reference 10.1049/el:19910596), which is hopelessly complicated, but does allow everyone to check all the votes have been counted correctly. Unfortunately I could not find a solution that both allowed for genuine voter secrecy AND restricted each voter to one vote. So there is the problem of coercion and paying for votes (which is why photography in voting stations is illegal, you could be proving to your 'sponsor' that you voted the way they wanted).
Most of the electronic election schemes I've seen allow whoever programs the machines to cheat with impunity. You don't need to hack machines or deny people in opposition areas the vote if you programmed the machine to misreport the votes. Even if there is a paper trail, unless you are going to use people to count the votes (not entirely accurate, but people are witnesses, which machines are not) the machines that count the votes must not know which candidate they are supporting or the system is open to fraud. Note that almost all of the USA's vote machine manufacturers are or were Republican Party donors.
The system of putting a cross on a piece of paper that is subsequently counted by humans is actually quite robust, has a nice trail that allows for genuinely independent re-counts, and, importantly, forensic examination of ballots in the event of suspect fraud, ballot box stuffing etc. Creating thousands of fake votes by computer is easy, doing the same for paper ballots is really tricky, and can lead to imprisonment.
Basically, sometimes the old ways are best.
As for the law, one hopes there is a defence of 'it being in the Public Interest' to protect democracy, or at least of 'legitimate comment'.
**(Including surprisingly one from the late, lamented, Prof Roger Needham.)