If society thinks there are too many sports cars or yachts, then it can increase marginal wealth/income/property/sales taxes. And if society thinks there is insufficient food or infrastructure, then it can pay people to make food and build infrastructure. Either way, if both are competing for the same supply of labor, only the highest bidder will get it.
There are too many sports cars and yachts. We don’t need a single one of them. There are half a million homeless people in the US. The only reason taxes aren’t being raised on those and other luxury goods is because politics isn’t controlled by an algorithm but by a system whose outputs feed back into its inputs: the wealthy are made wealthier through political decisions.