Yes buy this and study it - it discloses all tequniques to steal the election ping H Hewitt Savage and MM
Either at the precinct voting place or at the central counting area.
My solution? Instant Double entry: a tally at a central location and at the local voting place. If the central computer senses a deviation at any voting place, the entire crew is replaced instantly.
In addition a monitor can be placed at every voting place. If I go in, vote, and on my way out my candidate's count hasn't increased by at least one, I challenge the workers.
And of course, the most obvious deterrent. Give each party the right to have at least one observer at each polling place at all times, and accompanying the ballots to the central counting site.
Of course, the simplest and most obvious safeguard is to record the residential address of each vote by means of photo ID. If there are 842 votes from a single address... All business addresses would be automatically void.