The bottom line is that H1B visas greatly benefit the US economy. Anyone who thinks that companies like Microsoft, Google, Meta, Nvidia, Goldman Sachs , etc knowingly break immigration law and hire foreigners at lower wages than they would have hired American workers at and thus risk tens or hundreds of billions of fines and jail time for their executives is a complete moron.
Now, there may be some fraud going on by fly by night body shopping companies, but that is a failure of the USCIS and other administrative agencies to implement the law and not a problem with the programme, per se.
Prima facies , a reasonable solution would be to get rid of the lottery and make the priority salary -based and have a floor on the salary - say 250K or even 500k. However, both the right and left lunatic fringe will probably oppose this . The right wing idiots will be angry that this will favour the blue coastal states like NY and California and the left wing idiots will be pissed off because some of the woke , non-profit type companies will get priced out.