Excellent. You are suggesting the same process now used for nearly all online bank transactions with Two Factor Authentication. Millions use this everyday around the planet.
Recording votes to an optical disk and who voted to a separate, permanent disk easily replaces the current demand for a paper vote to allow auditing.
I would add a secondary, network data base also showing time and location plus the polling place and staff. This would not be an official tally but would be an edit check and audit control. If the official, optical storage differed from the audit record there reason would need to be determined. This would double protect against swapping optical disks from the polling place.
Let’s not pretend. The primary reason for the failure to move to this of system is the high level of political corruption that seeks to suppress large groups of nonwhite and poor voters. These are the people demanding voter suppression because of, as you note, nearly unheard of illegal voting. This system with electronic confirmation against voting registration with all citizens automatically registered would completely eliminate voter suppression. Therefore it will not be allowed without removal of corruption from government and political parties.
I advocate, along with many others, for a biometric based, multi factor official authentication system as is being implemented in advanced nations such as China and India. This would force the issue of personal information ownership while removing personal information from the marketplace except as granted by each individual.