I don't think we disagree on the basic principle, but I see a problem where an unforseen or unforeseeable case means following the letter goes against the spirit. Do you punish someone who does something the rules inadvertently forbid?
I would imagine that if a case was presented where the letter of the law was considered odious to a judge, that judge could appeal the particular law in question with a proposed modification, to a body that could determine if the proposed modification is acceptable based on a combination of community consensus and logical coherence with the rest of the law and its axioms (like a constitution) with the understanding that certain rare cases will inevitably fall through the cracks. The goal should be a theoretical 95%+ justice. I would estimate the current system would be lucky to approach 45% justice.
For example, a fundamental axiom (principle) of law could be something like, "personal sovereignty" or "family first" or "+prohuman" or "innocent until proven guilty".
These axioms could be explicitly defined and the definitions checked for internal logical coherence and logical coherence with the other axioms as a group, and placed into a hierarchical structure, and scalable as they relate to individual, city, county, state, federal and foreign policy and trade rules and regulations.
These axioms (principles) should be durable enough to include most, if not all, foreseeable technological advancements, including computer intelligence (skynet), war, natural disaster, official corruption and an eventual corporate or state panopticon (which we might already have).
And enforcement should be automatic and uniform wherever possible.
Journalistic standards and practices could be as simple as "no ad hominems" and "never state opinion as fact".