I guess that's why almost every successful corporation (some of them larger than small cities by population and larger than small nations by GDP) does central economic planning.
There is actually some interesting literature on this subject - start with Coase's Theory of the Firm. But you won't get there by HN playing "capitalism vs socialism" like 12-year-olds.