The FBI and the Justice Department are not a separate branch of government; they are subordinates of the president delegated to exercise his power, not their own. Even on Comey’s account, Trump did not order him to shut down the Flynn investigation, even though he could have. Trump could have ordered an end of the Russia counterintelligence investigation, but he did not. He could have pardoned Flynn, which would effectively have ended the FBI’s criminal investigation — beyond any possibility of review. We can stipulate that these would have been sleazy things to do, potentially damaging to national security, and still grasp that the president had the undeniable power to do them.
Similarly, the president had undeniable power to fire the FBI director. You can argue that his reason was corrupt, but the truth is that he didn’t need a reason at all — he could have done it because it was Tuesday and he felt like firing someone; he could have done it because he figured that the Justice Department’s criticism of Comey’s handling of the Clinton e-mails investigation gave him the political cover he needed to dispense with a subordinate he found nettlesome. The point is that even if the president hoped that cashiering Comey would derail an investigation he was addled by, it was wholly in Trump’s discretion to fire the director. Moreover, firing the director did not derail the Russia investigation; it has proceeded apace under the director whom Trump appointed to replace Comey.
The president may not be prosecuted in a criminal judicial proceeding for exercising his discretion, however objectionably, in executive matters over which the courts have no power of review. If Mueller tried to indict him, Trump would have unfettered discretion to fire Mueller and to direct the Justice Department to drop the case.