I don’t think the current ID structure has any field for religious or racial history. It’s simply a unique number assigned to a person at birth.
I might trust this government not to do that, but I don't trust a future government (because I don't know who that will be).
Without looking, I honestly don't know if the passport and driving licence lists this information. But the census certainly does.