It's not always easy to quantify. Consider people like janitors or security guards. They may be absolutely critical to the business running even though they don't produce revenue directly. Even if minimum wage was set to $100/hr for these jobs, it would still be worth it for many companies to hire them, since producing
any revenue could be contingent on having people in those positions. At the same time, they are very competitive labor markets, so without a floor, the pay could go very low despite being essential to the business.
When someone is directly contributing to revenue, like a factory worker or salesperson, it's a bit simpler since you can look at their output, but you still need more information than gross margin to know the maximum a company could profitably pay an employee, since a company might design their operations very differently depending on the price of labor.