"Our system is designed around checks and balances"...who make the check and balances ? humans...which exactly means your current system can never be fair...that's why all current legal systems are doom, they can never achieve their mission of providing fair justice...for any software code, given the same input, it always only has 1 interpretation and 1 output, but for the legal system, the same case with the same law will give different outcomes depending on time/people...software engineering practices should just be used in the legal system for it to have a chance of achieving its mission :)
I know this is picking nits, but that just simply isn't true. There isn't always the same output for every single input. That's why there's race condition errors. AI Systems will also alter outputs based on the same input (unless you assume that the knowledge base is constant).
Besides that, there is very good reason for justice to have the ability to change course. While humans are writing it, judging it, and punishing it -- they are also committing the crimes which means their actions might not be all that clear cut.