the progbrammer who makes your device do what you want it to do can control the output. period. anything that can be programmed can be programmed to yield the desired outcome.
I can program this (and I haven’t written a real application in 15 years or so) in a short time, and there is absouutely no way you can catch me.
I am a programmer too. There’s no way you can program past the requirement I put in that the voter inspect his own physical ballot and drop it in a box, and the later check of the physical record results against the electronic results. You would need the full cooperation of most if not all of the election personnel on site, in every district where fraud was to occur.
Even then, you’d have to be one hell of a programmer to do it in a way that wasn’t able to be detected by post facto by pattern analysis.