http://presidentbyamendment.com/issues/votescript is an example of a bash script for a generic US voting precinct that edits a paper ballot. It now runs on a billion or two Android devices, and therefor obsoletes voting machines.
Your local poll needs a couple bluetooth printers, a couple reams of paper, and a ballot box. You local unix geek adapts votescript for the local options, and people prepare their votes on their phones.