On election day, shut down the lottery and move those machines into the polling places.
I’ve always thought that States should contract with a private accounting or auditing firm to manage the elections and ballot counting. A private company has strong incentive to make sure their reputation isn’t tarnished and will highly diligent in following all laws and regulations.
Governments don’t have the same pressure to produce exemplary results like private companies do.