This ideal state is what people tend to be vaguely gesturing toward when they say they want "meritocracy." Even this state isn't really meritocratic, but it certainly has a management structure that knows what it wants and is actively steering every action of their subordinates to get the highest-ROI goals accomplished sooner than later; and where there is enough demand for skilled work that skilled workers are reserved to exclusively do the work they do best.
† The assumption (that seems to cash out at least somewhat) being that when two armies of equal size clash, the winner will be the one with a better leader-of-leaders, the one who has instilled a better management philosophy into their officers, such that the army as a whole ends up being run well. If there was some way to make entire departments of a company "fight", the way that two army battalions can engage in mock battle to determine their overall relative competence, capitalism might actually be able to succeed in evading the Peter Principle. Anyone have a good idea of how to do that?