I think the answer is that open source made developers more valuable because they could build you a whole lot more functionality for the same amount of effort thanks to not having to constantly reinvent every wheel that they needed.
More effective developers results in more demand for custom software, resulting in more jobs for developers.
My hope is that AI-assisted programming will have similar results.
I don't really know myself, but I think there's a decent change that most developer jobs will actually disappear. Your argument isn't wrong, but when we're nearing (though still far from) the state where all productive tech work can be handled by LLMs. Once it can effectively and correctly fix bugs and add new well-defined features to a real codebase, things start to look very different for most developers.
the anwser is yes, while in the meantime, the expansion of the industry offset the surplus of developers.