Right now, when you are taken to jail, you don't get any trial. The city guard goes full Judge Dred on you.
My idea, is if you would have a 4th option to stand trial, which would place you in court with up to 3 witnesses and the victim (if they're still alive) where you would persuade, bride and intimidate your way to a clear named (or lighter sentence).
Didn't like that guard barreling down on you for accidentally picking up that fork from a table? Well now you can let them know it was a mistake!
And that's just how a trial could possibly play out for petty theft. I could easily write all the dialogue for trials, but gathering witnesses and victims is beyond me.
So, well. Maybe another modder might try to tackle a project like this.