This isn't true universally, in fact, fair to say it is rarely true [1]. Often the vote is tabulated electronically, but there is always a bipartisan committee overseeing random re-tabulations and recounts as a matter of course. In the process of rolling up results, there are cross-checks with voter rolls that make certain types of ballot stuffing infeasible (that is, an attack would have to be a read/modify/write).
There are also state departments that are tasked with overseeing the general quality of elections that will spot outliers and investigate. It's always possible that corruption or partisan efforts will bypass scrutiny (and there have been several iffy cases of precincts in previous election cycles) but that has been a problem even pre-electronic equipment.
[1] https://ballotpedia.org/Voting_methods_and_equipment_by_stat...
EDIT: the parent post has been modified to be slightly less aggressive in its claims, including limiting the scope to "some states". Also added "And even if they did (as many do), few states have a uniform system of random vote audits", but can easily be refuted [2].
[2] http://www.ncsl.org/research/elections-and-campaigns/post-el...
Some of those states are now, or will become swing states. As we saw in 2016, where the presidential race was decided on a 400k margin of error across 3 states, it doesn't take much.
The non-pure ones (that is, paper + DRE w/o paper trail) only include one swing state, Pennsylvania, which is switching to paper ballots for the next election cycle.
So I guess voting machines pose a hypothetical threat, if they were adopted more broadly, but the opposite is the trend.
If you have paper ballots, sure, but the US does not have paper ballots in some states and won't by the next national election. And even if they did (as many do), few states have a uniform system of random vote audits.
So I'm not sure what you're referring to with this:
> There are enough checks in the system (bipartisan counting and validation committees) that a pure digital compromise of an election that would not be flagged and detected is very small.
I literally read the Diebold Voting machine source code (and tabulator) that was leaked (twice). There's nothing remotely like that in there. There's no facility to do that. And while most of those are now retired, there's similar machines that work exactly the same way still in usage.