There's nothing in the American constitution preventing a convicted felon, or even a prisoner, from being elected president. So it's mostly just up to if he can get the support of Republicans.
It is still an open question on if a president can pardon himself. Would probably depend on what the AG at the time would think as far as letting him out of prison if he pardons himself. Good thing is Trump appoints the AG so if Trump wins and is convicted he is getting out.
And we've learned that the rest of their country will then talk about how bad it is that rule of law has totally collapsed, and just sit around and shrug because there's no possible way to show disapproval of a despotic regime besides grumbling online.
With any luck we have ten or so years before we wind up back into that timeline though.