I think you can criticize targeted visa programs without committing the lump of labor fallacy. The reason is that very targeted types of migration such as high tech visas can cause market distortions relative to other fields.
For instance, every new developer probably leads to employment for baristas, brick layers, dermatologists, mortgage brokers, real estate agents, and divorce lawyers. Because developers and engineers in general tend to generate wealth rather than redistribute it, this is especially true.
Here's the thing, if you create a visa program to allow easy migration for developers, but not for all those other professions (or you create a regulatory state that makes it very difficult for migrants to join those fields), what you create is a market distortion. Because new economic activities are available without the competition from the newly arrived migrants, those with existing work and residency rights will have an incentive to avoid engineering and go into other fields. Even if people aren't specifically displaced, even if pay rises a bit, better prospects in other fields may ensure that the existing workforce never goes into software development or engineering in the first place (i.e., someone who would have done so will now instead go into dentistry or tax law).
This, I think, is what we've seen - people who have the right to live and work in the US at the time when they are choosing a career path are shunning these fields. Now, if migration were more general, it wouldn't do as much harm to developers, because while there would be more competition, it would be spread evenly across all fields, not just software.
Think of it this way - suppose we allowed farmers to come to the US, but only if they grow lemons. If you switch your crop, you must leave, because there's a shortage of lemon growers. This would hurt likely harm existing lemon farmers, and you'd expect them to switch to a different crop (probably avocados, where they don't have to compete on price with the suddenly larger and captive population of lemon growers). There might seem to be a shortage of lemons, prices of lemons might still go up, but until they reflect the opportunity cost (what you could get growing avocados), people with the choice won't grow lemons. In this case, the "come here if you agree to grow lemons" visa program would be creating a market distortion that is preventing the lemon market from "clearing".
This is also why a lot of people who have no objection to general skilled immigration strongly oppose such specific tinkering with employment levels, and why a lot of people feel that there really is no evidence of a developer or engineer shortage when you consider the opportunity cost of becoming a developer for people who are free to choose a profession.
For instance, every new developer probably leads to employment for baristas, brick layers, dermatologists, mortgage brokers, real estate agents, and divorce lawyers. Because developers and engineers in general tend to generate wealth rather than redistribute it, this is especially true.
Here's the thing, if you create a visa program to allow easy migration for developers, but not for all those other professions (or you create a regulatory state that makes it very difficult for migrants to join those fields), what you create is a market distortion. Because new economic activities are available without the competition from the newly arrived migrants, those with existing work and residency rights will have an incentive to avoid engineering and go into other fields. Even if people aren't specifically displaced, even if pay rises a bit, better prospects in other fields may ensure that the existing workforce never goes into software development or engineering in the first place (i.e., someone who would have done so will now instead go into dentistry or tax law).
This, I think, is what we've seen - people who have the right to live and work in the US at the time when they are choosing a career path are shunning these fields. Now, if migration were more general, it wouldn't do as much harm to developers, because while there would be more competition, it would be spread evenly across all fields, not just software.
Think of it this way - suppose we allowed farmers to come to the US, but only if they grow lemons. If you switch your crop, you must leave, because there's a shortage of lemon growers. This would hurt likely harm existing lemon farmers, and you'd expect them to switch to a different crop (probably avocados, where they don't have to compete on price with the suddenly larger and captive population of lemon growers). There might seem to be a shortage of lemons, prices of lemons might still go up, but until they reflect the opportunity cost (what you could get growing avocados), people with the choice won't grow lemons. In this case, the "come here if you agree to grow lemons" visa program would be creating a market distortion that is preventing the lemon market from "clearing".
This is also why a lot of people who have no objection to general skilled immigration strongly oppose such specific tinkering with employment levels, and why a lot of people feel that there really is no evidence of a developer or engineer shortage when you consider the opportunity cost of becoming a developer for people who are free to choose a profession.