It could certainly run with 20 staff – it would just spend a lot of money on license fees to a separate Facebook Services Inc that provides software and server administration services. This is similar to how companies avoid tax e.g. IKEA and Starbucks.
It could similarly avoid large profits but avoiding large revenues works be trickier. But I'm not an expert in these things, so maybe it's possible if you really know what you're doing.
The problem is, there's no legal distinction between a company that own shares but is "really" part of the same company, vs a completely separately company owning shares e.g. a pension fund.
That's easy to fix, just apply the rules only to companies having more than a hundred shareholders, and count shareholders of the parent for any subsidiary. Then you can't restructure Facebook to have less than a hundred shareholders because the number of shareholders is independent of the internal corporate structure.
All of the major tech companies are publicly traded.
Being publicly traded is also a major risk factor for hostile corporate behavior, because the top executives of private companies tend to be the owners and care more about the long-term than short-term profits, so it even makes sense as an explicit policy choice to regulate publicly traded companies more than private ones.