From a (former) fed employee viewpoint, I don't think term limits are the answer. Dogmush made many good points. Stream of consciousness response:
In many cases, it's not even the GS level, but where people are and what they do. I don't see any reason to put a term limit on the USGS GS-9-12 techs who really don't give a *expletive deleted*it about politics, but are just happy going out and collecting river flow data, or verifying benchmarks, or running sidescan on a boat to make bathymetry maps.
In my experience, it is mostly the gov employees involved in policy that are the deep state, whether GS-7 or SES or anything in between. I have real world examples as my job often intersected with policy from both the enforcement and science perspectives in the marine environment, so I saw a good sampling of the "straight from a college "environmental science/policy/management MA degree" to gov employment people. Also people who previously worked for NGOs that got jobs in the gov. The latter was prevalent during Obama. Obama's appointees would come from some University or enviro NGO, then have hiring power to hire SESers, who had hiring power to hire GS-15s, who had hiring influence to hire lower GS levels, and guess what? Suddenly wherever I turned, there was a new gov employee connected to some NGO, and guess where their loyalties were?
Even under Bush, some of them got in. One concrete example from personal experience: During the introduction of some new marine regulations that involved my office, our Director came out from DC for an internal FOUO (for official use only) meeting with a half dozen of us. He had mentioned that we were very likely not going to pursue a demand by an NGO, the Environmental Defense Center(EDC), on some particular regulations in a larger package, based on a request by the USCG and USAF. All information was supposed to stay in the room. A week later, the EDC filed a lawsuit specifically on those regulations. I'm pretty positive that the information was leaked by a GS-12 in the room who was chummy with a regional EDC Director. No way to prove it.
How do you stop stuff like that? The above example was just some regulation found on page 34,567, paragraph Z on Federal ocean regulations. Now think about bigger stuff that affects a whole lot more people.
There is always going to be a "fifth column" in the gov, whether it's a GS-9 hippie environazi or a GS-15 with an agenda. I suppose, as suggested, some kind of "term limit" on SESers might reduce "philosophical hiring", but I'm not sure it would be at all beneficial in the lower grades. And lets face it, fed.gov is always going to be pretty strongly blue.
Perhaps what might work is making it easier to fire feds (which I think Trump is looking at). And maybe not refilling some of those FTEs.