@inthehands
As I recall from reading the US constitution (many years ago now), the manner in which members of congress and electoral college electors are chosen is entirely up to the state. There is no legal requirement that they be conducted by elections at all. This was left there to allow slave-owning states to hold elections in which slaves were disenfranchised and kept to allow states to disenfranchise voters at a whim by making felons ineligible to vote.
But this could also be used in a positive way. For example, there is nothing stopping a state from passing a law that says that, if a federal agent comes within a 500 M radius of a polling station, for any purpose except to cast a vote and leave, then all votes cast in that polling station for any candidate from the same party as the current holder of the presidency, are discarded. And if this happens more than, say, fifty times in a single election, all candidates from that party are disqualified from the ballot. Such a law would effectively say that any attempt at election tampering or intimidation by the executive branch automatically causes the party in control of that branch to lose the election statewide.