Earlier quoted context omitted.
The good news is election security researchers mostly agree with you. The prevailing opinion of election security professionals is that State election systems should be designed assuming the machines are insecure and the process should be tolerant to that fault. That's why many states that use electronic voting or tabulation produce a voter verifiable paper trail. That means, when you're done voting the machine gives…
checking a random sample is not enough for the US election system. in a few states it's decided by a few thousand votes
You can't say that without saying how large the sample is. Certainly, if the random sample size is "100% of all ballots" it would be enough.
Risk Limiting Audits take that into account. There's a rigorously backed formula for determining how big the sample size needs to be based on the margin of victory. The closer the election, the more ballots are included in the sample.
In fact, you're right that a _very_ narrow margin requires a random sample that ends up being very nearly or actually all votes.
Georgia is a perfect example of this. Georgia applied a Risk Limiting Audit to the Presidential Election. Because the margin was so close, the RLA required them to sample every single ballot cast. The first "complete hand recount" of Georgia was actually a Risk Limiting Audit.
Here is the GA SOS reporting out the results of that first statewide hand recount: https://sos.ga.gov/index.php/elections/historic_first_statew...