I have no reliable recipe, and I suspect you may not find one, but anecdote:
- Military for 12 years.
- Programmed some software that become widely adopted in the community in a "bro-level" fashion.
- Got hired by someone else in the community who started a government contracting company. Have the sort of job responsibilities and salary you describe, with no prior formal experience, but lots of independent programming/software design work.