I remained a W2 employee all of my career. Staying employed was pretty easy with serial recruiting to solve huge problems being the mainstay of my activity. I had a co-worker (briefly) who preferred the model of founding a company and selling. He's still doing that. He's a very bright guy. At the time I recruited him, he was working in Japan at the time of the Fukushima related earthquake. I had done work for his father in 1993. Rescuing him from the post earthquake fray and bringing him onto my current project was a win...albeit short term...before the next founding move.
In my last engagement before retiring, I was dealing with system components that were very old JavaScript. They were neatly structured with inline inclusion of <--!script--> and <--!style--> tags. I made comments of those two tags so the HTML filter would allow them through here. Modular for the time when coded. About 450,000 lines of code built that way. The customer began doing security scans on this legacy code and wanted the Content-Security header safeguards implemented. Turning just one of those on in the server immediately broke all of that beautifully structured legacy code. We had 2 engineers who had coded the original files, so they knew exactly how that code should work. The customer had a deadline to do it that was far shorter than the available man-hours to rebuild and test to meet the new security expectations. I retired before the question of how that magic was going to occur.
Sounds very interesting, and your story shows that there’s no substitute for tribal knowledge...
P.S.—I actually had to retype my reply to your post as FR’s server failed while posting the first time.