His memos largely laid the groundwork for Trump and Eastman’s final desperate bids to upend the election.