> If harm was the goal, something like a STEM worker tax or cutting R&D tax incentives would be easier
These would affect all STEM workers equivalently. The H1-B program, whatever one thinks of its merits, hurts domestic STEM workers and helps immigrant STEM workers.
Perhaps the result is that the overall opportunities are greater because the larger talent pool results in more companies being formed. That depends a lot on how mature the industry is, and whether technological trends like generative AI will replace large swaths or STEM workers altogether.