With all these ways to cheat, proposing a new way to fix it should be something we think about as well.
Machines aren't gonna go away, nobody wants to wait weeks for results.
Machines should scan ballots, to image, and the image should be public.
Everyone can see the ballots and count them if they choose to.
Ballots should be serialized and when you're given a ballot you should get a receipt for that ballot.
If you want to check your ballot online, you can go and look it up, see how it was scanned and also see how your vote was cast.
Machines shouldn't be doing magic and spitting out numbers. I wanna see the ballots as an image and I'm sure theres plenty of ways to process images with different programs to come up with results.
If everyones program comes up with the same number, then we can agree.
I believe this has already been done, but enforcement is an issue. If officials are well paid to look the other way our ass is grass.