I know it sounds cold, but it's true. I totally get where you're coming from. I say this because your methodology of approaching the issue will fail.
If we want "succeed" we need to find places where we produce greater utility then AI. We have to find places where we are better.
Asking for joy isn't going to mean anything in the end.
But I agree that it’s over for those passionate about code wanting to make a living that way. I switched careers to clockmaking.
It is not narrow. It is the utmost realistic non delusional outlook on life. Most of humanity throughout the world and throughout history is a battle for survival and competition. We are designed to survive, not "work for fun". Only a select few lucky people in the upper echelons of human civilization can "work for fun" and complain about the luxury being taken away.
It is not trading misery for cash. It is trading misery for survival.
Plenty of people have careers they enjoy and those people are lucky af.
The joy in what we do is based on the process not only the output.