The Brennan Center for Justice published a concise primer on the use of U.S. troops, other federal employees (including the Justice Department), militias or others to watch polls or oversee voting, the way President Trump has suggested that his "army" of supporters might do.
The bottom line is that in almost all cases, federal laws prohibit the use of troops or agencies like DOJ or the Department of Homeland Security to enforce election security. The president couldn't deploy the National Guard because when they're under federal command, National Guard troops are considered part of the U.S. military.
State and local law enforcement can be used at polling places in very restricted ways, but never under the direction of the president or the federal government. Off-duty police officers, militias or vigilantes are not OK.
The Brennan Center conclusion: "Federal and state laws clearly prohibit any deployment of the military, law enforcement, or vigilantes to the polls to intimidate voters or engage in any operation unrelated to maintaining the peace while elections are being held. The president's suggestions that law enforcement should act inappropriately or that vigilantes will storm the polls are simply designed to discourage voters, particularly voters of color, from voting and to undermine faith in our elections."