That said, I will still take "biased human picking what to prosecute" over "a prosecution sufficiently funded to prosecute literally everything". I mean, sure, I'd prefer "real justice", but "biased human" is still constrained in their actions and has to produce enough results useful to society to be able to hide their corruption in, whereas totally perfect enforcement would be a nightmare.
The world is made of individuals and groups with biases, and as long as they have even the tiniest amount of power, those biases cannot be removed from the process.
My point is that locking "improved funding" to "improved legislation" is impossibly without a way to usefully measure improvements in legislation. Improving funding has a few ways to measure it, but in the discussion we've been having I took improved to mean "more". As for legislation, I don't think we want more legislation, but any measurement is rife with problems. As a simple example, legislation if perpetual until changed (or created with an expiration), and laws created today with a beneficial effect may have a deleterious effect years or decades from now. Examples of this are abundant, such as patent and copyright laws not dealing with the nuance of the digital age, to privacy laws not taking into effect the ability to store everything that happens in a way that can be indexed and accessed because of computers.
A moderately good law today may become a real problem tomorrow. Given that, how do we measure legislation when the effect time is essentially unbounded?
I.e., a legal system where the "choosing" of which cases to go after, is somehow built into the letter of the law (maybe with a high bar in the indictment process?), such that everything that is illegal by the letter of the law is something necessary to go after (the societal equivalent of a showstopping bug—serial killers, for example), rather than just a "nice-to-have" that could be indefinitely deprioritized.
you'd instead be giving police the freed time and resources to both investigate real cromes like murder, theft and corruption, and also commit to community policing around observing, teaching and encouraging good civic behavior, rather than writing pointless jaywalking tickets.
One of the subtle checks & balances in our system is that we don't even want prosecution to literally go after every crime... we want them to choose the things that are actually important. There's a lot of things labeled "crimes" today where the cost of enforcement greatly exceeds any value to society of that enforcement.
(Expanding on that, one of the biggest problems, if not the biggest problem, with automated crime enforcement is that it removes this check & balance that almost nobody has even realized exists yet.)