There are two ways to rig an election. The first is miscounting or changing votes but I think the other is the real risk and likely dates to the very first time we as a species ever started having votes by anonymous ballot: ballot stuffing. If, at any time in counting process, an individual could successfully insert a single valid but fabricated ballot into the process, the entire system is vulnerable.
And the number of votes required to change elections tends to be shockingly low. In the 2020 election, more than 155 million people voted, but the outcome of the presidential election itself was decided by a total of less than 43,000 votes [1]. That's a margin of victory of 0.03%. So a system that was 99.9% accurate at ensuring that each ballot was completely legitimate would be insufficient.
[1] - https://townhall.com/tipsheet/mattvespa/2021/02/10/wapo-the-...