This won’t solve everything, but will go a long way.
When you go get your ballot, you first select a four-digit number like a serial number off a computer screen. Only you know what it is. When you hit “go” out comes your ballot with your unique ID number printed on it, plus ID numbering for the precinct. When you cast your vote, you get a xerox copy on counterfeit-proof paper. Now you can go to any computer, google your precinct, and scroll to the data region that has your unique voter number. Only you know which vote you are looking at. Now you know whether the system actually counted your vote correctly. You can also totalize votes for your precinct or city or county or state if you use the right software, and see if TV reports are accurate.
Some say this would allow blackmail and bribery. But a huge proportion of voting happens absentee, and that is already hugely subject to blackmail and bribery. So as long as there is absentee voting there can be no legitimate objection to the proposal of the preceding paragraph.
We already are doing almost exactly this same thing. Every time you pay a dollar for a lottery vote for 5 numbers, you are getting a copy of how you voted instantly, anonymously, and for cheap. So we know the technology is practical and economical. What the lottery does on a daily basis, the voting system can economically do merely once in two years, and only crooks with vote rigging to hide can object. If it works for cheapie lottery tickets, it works for my much more valuable vote.