I don't understand why voting machines can't just print your vote on a piece of paper behind a plastic window for you to see while also recoding the vote in a database. That is 100% anonymous and can't be cheated. The database is the instant answer at election closing time, and then you can take some days to count the papers as confirmation that nothing weird happened.
No way to hack that. If you print something different on the paper the voter will see it. If you try to hack it by printing more papers than actual votes, the paper count won't match the amount of voting passes that you collected/verified when letting people into the polling station.
It may even be safer than the current paper approach, because if the paper vote counters try to cheat their counts won't match the database triggering an investigation as well.