That is what the Kuwaiti government did, years ago. This might work for authoritarian governments, should not work in democracies
The next logical step if you don’t think the 5th was violated is collecting DNA from everyone (eg: repurposing COVID swabs) so you can identify all the potential suspects from your sampled population while completely ignoring that someone from outside the sampled population could be the person you are looking for.
Being able to positively identify people is a reasonable function of a government, including democratic governments.