Yes, but I think most Americans would be appalled by that because it has backfired. Thus I think the judge may NOT jail him because of the backlash. I agree with you it’s a wild card. I think the biggest wild card is the debate before hand. If Trump wins the debate and then goes to jail, it will be an easy Trump win.
I think the sentence will be very revealing and give us a clear picture of what Democratic power brokers actually believe about the race. I suspect he'll hand down a light sentence (could even just be a fine) if Democrats believe she is on her way to victory, because doing otherwise would rock the boat and disrupt her momentum. However, if they're not confident in her victory, then I suspect he'll hand down a harsher sentence, because he'll want something to disrupt Trump's momentum and reset the race. Obviously it has its risks, but when you're losing, you take bigger risks.