idk. It is already done quite successfully in many democracies, including Iceland and Estonia.
I’m guessing the vote is sealed with a key or a barcode, if a later vote arrives, a system will order a previous vote with a matching key/barcode to be destroyed. Finally on voting day, the link between any personally identifiable information is destroyed.
EDIT: Just to clarify, there should never be a time when a ballot is unsealed and a link between a barcode and a person exists in the system. A counter scans an absentee ballot before unsealing it, if the person voted in-person the scanner should reject the vote and order it to be destroyed the link could have been destroyed at any point between then and when the person showed up to the polling station. If they didn’t show up, the scanner will order the link to be destroyed, the counter will then pass this ballot on to be counted. Importantly the counter (nor any human for that matter) never has access to a link to a personally identifiable information, all the counter sees is the barcode.
EDIT 2: I don’t know if this is how counting is done in democracies that allow you to nullify a previous vote by voting again, but it is a system that could work, conjured up by a mere spectator.