i agree with everyone here, get away...
but i can see you wont take any notice of that advice...so...
you say he is getting help inside...thats good, but perhaps a longish sentence will actually do more good than harm...?
helping him get off is not teaching him a lesson and is showing him he can do what he likes an get off with it...and that you will forgive him anything..that will not make for a happy future for either of you...
if you must stick by him, do that...but let him take his punishment...
do nothing to help him get a lighter sentence ...show him his actions have consequences.
the best thing for him will be to have the fear of losing you, and of reality of prison to make him knuckle down and work hard to control himself in future
in the long run, you will benefit because his therapy and punishment will make him think twice before doing it again...