Seems like building and selling your own software (aka solopreneur) would help you to build capital at the same time as it also forces you to write good code.
Yes. That’s pretty much what I do. There are a couple of issues with this, though:
1) It’s difficult to do this, unless you already have a lot of experience, writing good code.
2) There’s a ceiling to what we can do, as individuals. I have heard tales of Linus, The Miracle Coder, who can write an entire operating system, as well as an industry-changing VCS, on his own; but I only know of one cranky Finn that seems to fit that description. Otherwise, most of us mortals need to work in teams, to achieve ambitious goals, and that brings its own set of challenges.