Nope. Just prohibit jailing people for being too poor to paying tickets and similar "crimes". This definitely does not require mandatory sentences which is an evil on its own.
"What would be left to the judge's discretion exactly" - f..n work within the limits of laws and regulations. The existing framework gives judges plenty of discretion as it is.
And the last thing. Sounds like you do not mind people being jailed for the sake of the judges having discretion? I guess you would not mind then going away for a couple of years for spitting on a sidewalk or something similar.
i.e. someone who has been banned from driving due to previous offences but who is caught driving may be sentenced to a maximum of 6 months in prison.