Here’s a timeline chart
https://usafacts.org/articles/how-many-people-work-for-the-federal-government/
Aside from immediately after FDR the federal government has been fairly steady at 3 million personnel. FDR tripled federal employees and its stuck like glue since.
What’s also interesting is the amount of DoD civilian employees has not changed since at least 1980 at around 800k employees, at the same time military personnel has dropped 39% in that same time period.
https://usafacts.org/articles/how-many-people-are-in-the-us-military-a-demographic-overview/
I can’t imagine anything other than set government bloat that has made a consistent need for 3 million personnel.
However, that also would be counterbalanced by the increase in government roles. For instance, there were zero federal employees managing airport security in 1940 vs. the 58K working for TSA today. Now multiply that by all the other new programs we have. Which isn't to say I agree with the government doing these things, but simply an explanation for why technology wouldn't decrease the size of the workforce.
My point being that it's popular to point at the number of federal employees and say "look at all those lazy assholes doing nothing and sucking off the government teet", but the reality is that we have roughly the same percentage of people in the federal government doing a great many more things than their counterparts in 1940. Even more so when you consider that the Defense Department has absolutely grown, so proportionally the other agencies have shrunk but have more things to do than ever.
The size of the federal workforce is ultimately a red herring. The question should really be: "what are the things the federal government is doing that are unlawful, or we just don't want them to do?". If you eliminate those functions, the employees doing them will be eliminated as well.