That was not a pencil but still a lot of technology/mechanics. But you're right, paper and pencil are not perfect, just the most secure we can practically achieve these days and probably for the upcoming decade. See this video of J. Alex Halderman on e-voting in Estonia and about electronic voting in general [0]. (Halderman is a professor also known from the cold boot attack and the more recent vulnerabilities in a lot of Diffie-Hellman implementations).