The Administrative Procedure Act (APA) of 1946 contains the rule that prevents the U.S. executive branch from acting in an arbitrary and capricious manner. Definitely not legit.
The Civil Service Reform Act (CSRA) precludes APA review amongst other relief (since it precludes district court jurisdiction entirely). That being said, this "termination" is likely invalid under the CSRA.
Please see Elgin v. Dept. of Treasury 567 U.S. 1 (2012) for details.
I would not take definitions of "arbitrary" or "capricious" for granted. Legal words never mean what most people think they mean, especially once the Supreme Court gets their hands on it.
This term is well defined in settled case law over the last 80 years. Thee Supreme Court already ruled Trump can not do these sort of arbitrary and capricious executive orders his last term.
I'm not sure he really cares if these actions get overturned. At least some of them will be sustained, even if only because somebody's lawyers faffs oral arguments. And I suspect that he'll just ignore the court in some cases. How many legions hath the Supreme Court?