I’m not at all sure the judiciary gets much of a say.
Individual state secretaries-of-state (or equivalent) determine who appears on the ballot according to state law.
Congress certifies the results.
Please agree with me louder.