@datagrok Yes, I think an UBI (Universal Basic Income) would do just that. Not only for programmers but for society overall.
An interesting concept would also be to get paid by LOC. Not sure how that would work though and som LOC is more important than other LOC. Which means as long as the LOC you have put in is used it will give micropayment/influence for what that software do and what it is making. Some kind of "share" based programming or how to call it.