I believe software engineers should be getting residuals from the products they help build. Like the way writers and actors get residuals for shows and movies they have worked on and are not a part of anymore. The company that owns that show or movie is still making money from licensing that and the actors and writers helped make that happen. Same with developers. Long after you leave a company that software product you helped create is still making money for its owner. Yes the structure would have to be hashed out. Ground floor developers would get more than maintainers. After some time OG creators would get less and the revisionists would get more. But at least developers could live off that money to take sabbaticals and not get burned out.
The challenge here is that once a show, movie, or piece of music is done, it’s done and can be syndicated out for decades. Software usually doesn’t work that way so you’d get into tricky situations like trying to license particular functions or code blocks, which would usually be trivial to rewrite to avoid paying royalties, etc.