My understanding is that the automation is to verify people who are needed by law, right? They don't voluntarily hear a beep and go into the jail. There are police officers that still have to arrest them and check their documents.
The situation is so bad in Rio that society simply will have to deal with any deficiencies in the automated system. It will still be better than the current reality.
The fact that police officers are probably not giving people of color enough flexibility in situations like these is beyond the scope of the automation system.
EDIT: Carrying your documents is not a popular opinion among the US audience, I understand. Still, I find it very reasonable and I think the situation that happened to this woman is being blown out of proportion.