> sure, but there's the obvious counterfactual: if those engineers were scarcer, that level would likely be paid more

There's another option: without a sufficient workforce, the projects just happen somewhere else. Then the local market stagnates, and you end up with very little competition between employers. And the salaries go down to match.

This is not a conjecture. The European tech sector is experiencing exactly this phenomenon. Even in large tech companies, the salaries for the same positions are about 50-100% higher in the US.