This is another good case for security-by-minimisation. I struggle to see why NI numbers were required on the electoral register — particularly when democracy in the UK had been functioning for over a century without them.
The best way to ensure valuable data doesn’t leak into the public realm is to minimise the amount of unnecessary data collection.