Have you ever noticed that when you go to vote, they identify you from a list, and before handing you your ballot paper, they write a number? That’s your voter registration number.
Each ballot paper has a unique number (see the back of it), and the counterfoil (the bit they write your number onto) also has the same number on it. As you can see, just like a cheque, it can be traced back. They know that Person X had ballot 123456789, that ballot paper had a cross within Candidate B. So that’s easy enough.
After the count, these papers, and foils are supposed to be officially sealed so that there is no chance of interference by anyone, according to the Representation of the People Act 1983 act, the seal can only be broken by the order of the High Court or Parliament, however, in practice ballot papers are simply bundled-up transported to a warehouse in Middlesex for the statutory period of one year and one day.
I know from personal experience that at a ‘count’, the votes are separated based on what was voted, any which have been spoiled are either discarded, or a consensus of people unanimously decide. Already all the sorting has been done, you have X number of piles for candidate A, Y number of piles for candidate B, and Z number of piles for candidate Z.
I have seen stories of this kind of tracing being used in the 1960’s when the Communist Party were around, and after an election, the details of the voters who voted for the Communist party were forwarded on to ‘Special Branch’.
So, what can happen to a large quantity of sorted material which links an individual person to an ideology, or political movement? Whilst we can only speculate what happens.