One way is to perpetually earn $500k on a 5% rate of return from $10,000,000. That's 33% equity in a startup that's acquired for $30,000,000--probably more rare than a tax accountant.
A programmer doing consulting work might make around $420 per billable hour, but probably as a peak rate and not sustainably.
You could combine income streams: a high paying software job (that's $100,000-$200,000/yr at the top levels) plus consulting (another $100,000+ worth of contracts in a given year is doable for some) plus some equity as a founder or early employee ($100,000 as 5% return on $2,000,000 in wealth) could get you there. It's not as convenient as putting in hours at an accounting firm, but a lot of good programmers fall into it anyway.
1. You built something really complex and a very rich client needs emergency help with it.
2. You are extraordinarily famous and a very rich client feels they must have you.
3. You are convincingly misrepresenting yourself as a team of 7 hardworking people.
4. You have an unusually efficient way of doing something, so you can win fixed-cost-for-deliverables contracts and execute them in fewer hours.
As for what a mortal working as a consultant can normally achieve, $420/h is more than twice what I would consider a very good rate. Only under very unusual circumstances can I imagine a programmer billing at this rate, even on a large corporate client.
Well, maybe if you were working for a bank...
Of course, there is much work that went into developing those classes that I get no hourly wage for at all. So I think of it in terms of, "I need to teach x courses a year" rather than $x/hour.
But technically, that is what the client pays.