I think you have to separate H1Bers into at least 2 categories, {Indian+maybe Chinese, everyone else}. Source: am H1B bro myself.

I'm from a shithole European country full of white people. The experience in the US has been very positive. People treat me nicely, both in SV and in rural Ohio. SV companies pay me equivalently to Americans as far as I can tell by asking around (for reference, depending on bonus/stocks my total comp is 200k+, which is not FAANG but above average for my position). Sometimes more for the same job. If I were kicked off my H1B, I'd just go back to one of the richest countries in the world and be fine. There's a smooth path to the Green Card for me, like for any H1B holder except Indians and Chinese.

That's kind of where the crux is.

As part of my job I've traveled to quite a few large enterprises that were not in SV, and often they have entire buildings full of 90% Indian H1B bros. I think 50%+ of all H1Bs are awarded to Indian citizens. There is a absolute cap on the number of Green Cards that can be awarded to citizens of any one country per year. In addition, India has about 10000 billion times the population of my shithole EU country.

Subsequently, the wait for my Indian H1B bros to get their Green Card is now several decades (it is "none" or "a few months" for most others except I believe Chinese).

So the indentured servitude is not due to H1B per se, but because of its interaction with the Green Card program for my Indian H1B bros and maybe Chinese H1Bers as well.

As a shithole European I can switch jobs pretty easily. At worst, I have to wait a few years to finish the Green Card process, so the "indentured servitude" is limited to 2-3 years. It is up to individual companies to decide if they want to sponsor your Green Card, but all companies I'm familiar with in SV will do so for any of their H1B employees with no exceptions. This might not be the case for other companies. My Indian H1B bro co-workers are paid just as well and treated fairly. Of course, the SV companies can't get around the Green Card cap for them, so that's still problematic. But the companies I've seen do not abuse that fact.

But the SV H1B experience is probably the exception if you look at the statistics. My Indian H1B bros at Certain Major American Companies You Almost Certainly Do Business With All The Time aren't treated nearly as well. They get thrown specs across the wall by managers (often Indians themselves), any response is silenced. They are often in physically different buildings or on different floors from the other workers.

The work I did in SV felt creative, challenging, and I was always empowered to do my job as well as my American co-workers. But those H1B-with-no-path-to-residency farms seemed like authoritarian sweatshops. During one consulting gig with Bank You Most Likely Use Daily, we saw a guy get fired for accidentally pushing a private key to Github. The AC wouldn't get fixed in the H1B-building, so we worked in a sweltering 85 degrees all day. The restrooms were in despicable condition, getting cleaned maybe 2-3 times per week. For a remote call, I was offered a used pair of in-ear headphones with somebody else's ear wax still smeared onto them. I politely declined and bought my own pair. I would've quit this company after a few months. But none of the H1Bers there can do that, because of their legal limbo.

To say that these folks are not empowered is a vast understatement. And I do think some companies are abusing this fact.

It's a hard hole to dig out of now. I've seen estimates that if you were to remove the per-country-cap for Green Cards, the next 5 years worth of Green Cards would go entirely to Indian citizens. Is it "fair" that one country gets 50-70% of all work (not family) based Green Cards? Is it "fair" that an Indian H1B worker has to stay in legal limbo for 25 years just because other people from his country also want to immigrate?

It certainly feels to me like the current setup of the H1B-Green Card pipeline has created pretty terrible conditions for a large percentage, maybe the majority, of Indian H1B holders, which is most H1B holders.

Btw: I'm calling them my H1B bros because Indian developers are always super surprised to learn that I, a white guy, am on the same visa. We literally bond over our immigration status, which can be very helpful in consulting work.

Maybe my first hint that the Indian H1B experience is different should've come earlier: when I first landed in SFO and went through immigration, the officer looked at my H1B and said "Oh, I thought that visa was only for Indians." And this is in SV.