The ballots are marked with a barcode that starts with a D for Democrat voters, and a R for Republican voters. Scanning the barcode during processing would identify it as a ballot, and which party the voter is registered to. Rerouting the Republican ballots to a corrupt mail office for disposal would be fairly easy with injected code on a machine where there is likely little physical security from regular employee access.