That went well for all the dutch jews in WW2 where the government also held detailed records about religious affiliation.. sometimes it is not about what is now, but what will or might be later.
Collecting that census data probably seemed reasonable at the time. The new use case that needed a new way of aggre4gating and presenting the data happened later, almost as an emergent property. The only y to prevent problems that haven't been invented yet is to minimize the attack surface: if the records don't exist, they can't be misused.
[1] https://www.verzetsmuseum.org/uploads/archive/museum/topstuk...