The problem is that government isn’t a computer. Plenty of corrupt governments convict political opponents of stuff like that all the time to bar them from running.
I agree with the other user, there should be as few barriers to who can run as possible, because the more restrictions there are, the more levers bad actors can pull while having some air of legitimacy.
We have a mechanism for this already: impeachment.
Bing!