If you want to come to the US to get a professional job, attending a US university instead of a domestic one is going to be worth the extra cost when it guarantees you a Green Card.
There might be a reduction in the flow of low skilled labor, especially for those looking to hire workers without legal status, but up the middle class portion of the labor market, expect the system to continue to favor cheap imported labor over domestic labor.
Undergrad selectivity/quality does affect rankings too, but it doesn't probably doesn't affect faculty recruitment (except for the rare faculty that care a lot about teaching), but grad student recruitment absolutely does. Even a pathological case of a selfish PI who doesn't care about the students themselves and just cares about his own prestige/publications is going to be very interested in the quality of grad students coming in each year. Even state institutions that favor in-state heavily for undergrad generally don't do so for grad school.
Likewise, having an international faculty and grad student base is typically considered an ipso facto positive thing for a university, which has a inherent role of exchange of ideas and thus also of the people that hold them. Some countries even offer grants to arguably more generous grants to foreign students (ex. the MEXT scholarship in Japan) for that reason--having quality international students is an essential part of the prestige of their unis and one that they by definition can't improve through their own students.
Re: your point about costs, even with tuition grants, the costs of grad school in the US due to double effect of the strong dollar and high cost of living is likely to be just as high as a domestic school with higher tuition but potentially free room and board, and much lower food/transit/etc costs.
You have a very idealized picture of what happens when a university is required to confer a certain amount of PhDs to maintain (formerly) R1 status and has to rely on F-1s to do it.
I just don't know whether that would mean more h1b and ghost jobs, or less.
Making America better for Americans won’t happen until both sides realize neither party is looking out for the interests of American people and uses social issues etc to keep us divided.