If your goal is maintenance mode for the company, milk profits for 10 years, and to be eventually replaced by competitors then I think you can run a company very slim. The other question would be, if you have captured a large market share (100s of M/yr to Billions in revenue), how many employees do you need to prevent an upstart from overtaking you through improved tech, product, or strategy?
For example, if FB never invested in ML they would have had even larger margins (fewer GPUs and ML engineers), but now that investment may pay off by fending off tiktok through copycat products and also rebuilding ad attribution after ATT. To complicate matters, before it happens, you don't know in what area your competitor will arise (ML? Product? Paradigm shift?). Similar examples with Google vs. OpenAI, ~2010s Kubernetes wars between cloud providers, Snap vs. FB/Twitter, etc.