I've seen a lot of things on HN, but I've never seen anyone argue that the current set of state and federal laws in the U.S. are anywhere close to 100% just. So you're going to have to factor in the cost of having perfect enforcement of unjust laws.
There's also the problem of trying to curb the bad effects of perfect enforcement after the fact. Show me a politician willing to scale back some of the bad law passed post-911. That's a difficult task because nobody wants the liability of being the one who was "soft on terrorism" or whatever the claim would be.
If you take those costs seriously, you'll need to take steps to ensure that the system does not in practice attempt to do perfect enforcement. And your arguments will sound more and more counter-intuitive as the capability for perfect enforcement-- and the dollars it would bring to a municipality-- grows.
Is the system vulnerable to a person being targeted, evidence fabricated, and a false conviction obtained? Yes, assuming malicious intent or corruption. I'm not sure AI fixes that.
Wouldn't that be a massive improvement over the current state of things? Convictions are currently made on the basis of very unreliable things.