I'll answer the questions you asked, then give you a better question:

AppAmaGooBookSoft are probably not what you're thinking of when you say "startups" and 5-10 years in any of them will make you quite wealthy indeed, by the standards of e.g. the American middle class.

Do some devs make north of $1 million a year? Yes, for a value of "some." (If you put a gun to my head, I'd say "Maybe 5% of the engineering workforce at AppAmaGooBookSoft. Possibly modestly higher than that in finance.") The shortest path to it is "significant contributions to a major revenue driver for a large company combined with aggressive negotiation."

Depending on where you draw the bar for "wealthy", there are a lot of dev-related businesses which can get you there. Consultancies with employees throw off a lot of money on a yearly basis and also build value which can be sold. Profits for a well-managed e.g. Rails consultancy are on the order of $2.5k~$10k per employee per month (math here: https://news.ycombinator.com/item?id=7155387), so if you run a 10-person consultancy, you do pretty well for yourself via distributions while also drawing the market salary you're paying all the employees.

There exist many product businesses which are primarily or largely software in character. There exist hundreds of software companies which toil in relative obscurity whose founders are (generally very quietly) millionaires even when one doesn't count the value of the company itself. I built a consulting career off of working for SaaS companies with, in the main, $10 to $50 million a year in revenue. There exist lots of them. The rough economics are often 10% COGS 10% marketing 10% G&A 50% salaries 20% "whatever the owner feels like."

Many of these paths will not involve you being primarily working on compilers and dev tools. (Compilers are a tough sell -- dev tools perhaps less so. There exist plenty of great small dev tools companies.) Even if that is what your business actually makes money on, you will probably have to a) get into business and b) spend the majority of your cycles on building the business rather than building the thing the business makes, unless you take the well-compensated employee route.

There are your answers. Here is my question: what do you want out of life? What does "wealthy" mean to you? What motivates your desire to retire early?

I once wanted to retire early, but that was a symptom of the underlying affliction "I hated what I was doing for a living." If you see wealth as an opportunity to choose to spend most of your cycles on something other than what you presently do for a living, you probably can achieve that without being sold-a-startup-now-I'm-loaded wealthy. Some of the happiest people I know run quiet little cottage industry software businesses on the Internet in preference to the day job. Most don't have seven figures in the bank, but their day-to-day lifestyle might resemble that of a "gentleman of means."

If you want to have sufficient free cycles to study something, consider as an option "Create some enduring source of value which solves the sustenance-for-myself-and-family problem with the minimum number of hours required per week; spend my freed-up-time studying rather than filing TPS reports."