https://www.opm.gov/policy-data-oversight/employee-relations/employee-rights-appeals/#url=Overview is a decent place to start looking into the relevant law, but the short answer to your question is that no one person in the federal government, including the President, has the power to fire a career appointment employee without due process. Exactly what due process is for a particular employee depends on how the employee was hired and how long they have worked for the federal government, but the gist of it is that unless the employee does something extremely egregious (commits a crime related to the position, assaults another employee, etc) or is no longer qualified for the position (e.g. loss of clearance), human resources has to log and show that they have attempted to improve the employee's behavior and given them a clear path to rectify issues (similar to the private sector, the Office of Personnel Management has guidelines for Performance Improvement Periods).
All of the regulation around this is to prevent exactly what you said happened in the "old days." Most of the federal government's senior staff is appointed by the President, and they can also be fired at will by the President. There is also a significant portion of the White House staff that are political appointees, and they are similarly let go and replaced between administration changes. However, for the rest of the government, a career in government is meant to be a career, and laws have been written such that careers can be made regardless of the person in power. The case you cited is perhaps an extreme example, but most career employees have jobs that do not directly depend on the current administration, and the ones that do are expected to do their job to the direction of the Executive without regard for personal politics.
US federal employment law is very lengthy, as could be expected, but US Code Title 5 Part III Subpart F Chapter 75, which is about "Adverse Actions" against federal employees (by their employer), gives some idea of the "due process" this answer mentions. Consider 7513 b:
(b) An employee against whom an action is
proposed is entitled to—
(1) at least 30 days’ advance written notice,
unless there is reasonable cause to believe the
employee has committed a crime for which a
sentence of imprisonment may be imposed,
stating the specific reasons for the proposed
action;
(2) a reasonable time, but not less than 7
days, to answer orally and in writing and to
furnish affidavits and other documentary evidence in support of the answer;
(3) be represented by an attorney or other
representative; and
(4) a written decision and the specific reasons therefore at the earliest practicable date.