My life and career being the disaster that they were/are, I never stopped to think about specializing for more than a minute, 5-10 times maximum. Always seemed extremely risky because I also have zero network. Even if I found a very lucrative job and stayed there for 2-3 years the change inevitably comes at one point (especially post COVID) and then if I lose the job I'll be out of luck and severely f_cked.
Hence I always tried to cast a wide net. I started regretting that decision in the last few years though; being treated as an interchangeable cog even if you are the best programmer in the team left a lot of marks on my mental health and I wish the world became a little bit more kind but alas.
But as a tax guy, I generally see the actual financial data (i.e., the actual 1099-reportable payments), and I rarely see anyone who actually does make 200k+ as a contractor. And all of those positions are always niche positions, and almost all of these roles are for less than a year: meaning: the 200k is the amount they would make if the role lasted a full year. So if they're making 200k+, it involves multiple gigs, which is a very different situation from making 200k+ at a single gig.
Just wanted to put out a data point that it is possible and enjoyable.
I do know a number of bank developers making 300k+. They work on the boring, unsexy backend stuff that makes the bank run. Each of them provides the equivalent value of about 100 front-end developers.
If you know someone claiming to make 200k+ as a non-specialized programming contractor, they're probably just making numbers up to impress the internet. Regular (non-tech) companies don't pay those sorts of rates to non-specialized programmers, and startups can't afford those rates. That leaves primarily FAANG or large tech companies, in which case YOE is irrelevant; they hire based on pedigree and who you know.