Like most presidential powers, the president's control over agencies is strongest when the president is popular with the people and has support in Congress.
Executive agencies are, of course, answerable to Congress as well as to the president. This means that Congress can, if it so chooses, put obstacles in the way when the president tries to exert control over an agency. This means that the president's control will be strongest when he (or someday she) has support in Congress or is popular enough to force Congress to do his bidding. A Congress that supports the president will not fight him for control of agencies. A Congress that does not support the president may still go along with his wishes if he is popular enough that people will support him against Congress.
In such cases, Congress is either unwilling or unable to effectively block the president and the president's control of agencies is at its strongest.