This is easy to solve; simply make it illegal to use the identification number so capriciously. Define a narrow use-case for it, narrow enough to allay religious fears, and forbid anything other use if the ID number. Make it illegal to require customers to provide their ID number while making purchases, etc.
But once you do that, most of the desire to implement the system starts to disappear...