I see your point about the election being a state function..
HOWEVER
I see no reason why a set of standards could be made law that a state election for a federal office must meet before the FedGov would recognize the election or the results of an election.
It would be ruled unconstitutional because Article I Section 5 already addresses this:
Each House shall be the Judge of the Elections, Returns and Qualifications of its own Members,
To "make it law" would require both chambers to agree on a bill, and the President to sign it. This would be a violation of separation of powers because there is no reason for a President to approve or veto a Constitutional Article I Legislative power to determine the qualifications of its own members.
Each chamber may do as you suggest on its own, but each Congress would not be bound by them unless they are voted into the rules and adopted by each future Congress.
The simplest approach would be for each chamber to accept or reject an allegedly tainted winner on a case by case basis, as stipulated by Article I Section 5.
-PJ