In a word, consulting.
If you've got domain specific knowledge and can walk in, solve difficult problems or implement the exact solution they need, you can charge them an arm and a leg for the amount of time you spend on it. They'd take months to tackle it cold anyway.
But getting hired as a consultant is usually a matter of who knows you, which is why all the consultants are either a) people who have been in the industry for decades, b) people who are working for the consulting agency that has been servicing the industry for decades, or c) someone's son-in-law.
Downsides are that there could be a lot more travel, sometimes there's resentment from the locals, and you're always in that initial first-impression schmoozing phase. Consultants can be like nomadic gypsies looking for the next sweet spot. This could be in terms of industry, technical skill-set, or physical location. Life on the road can be tough. (And I know a guy who flies from Iowa to Florida every other weekend, it's one hell of a commute). You get to see a lot of code shops, and I've heard that they're not always happy to have other people coming in to do their job. Other times you are their savior coming down with divine solutions and banishing the beasts that plague them. Rarely do you settle down in one company long enough to be comfortable, and even if you've been there for years, you can still be "just" the contractor.