Computers can't solve every problem.
There will always be inherent problems with mail voting, which is why it should be only allowed for those that are unable to get to a poll.
You could have ballot tracking to ensure it gets scanned through to the destination, but there is nothing stopping someone from duplicating a ballot and throwing away yours.
At the end of the day though, if you don't have two people validate every ballot from different parties, there is always a chance people will throw away ballots, or dump boxes that come from certain counties, or "forget" to submit results.
Security is never about stopping something 100%, it's about building the wall high enough that it's prohibitive to break in without a high likelihood of being caught.
The primary challenge is working around the secret ballot. If a computer knows who you voted for, then you should assume everyone knows who you voted for.
Computers can't solve every problem.