When Donald Trump signed an executive order in March asserting radical powers over elections, he invited lawsuits. He’s now losing the court fights.