You make enough money from working in software that however much you will make in your second act (note: not necessarily zero) plus what you've saved up and investment proceeds thereof is enough to sustain you.
The same as retiring in any other field.