SO is probably a very significant factor in the success of LLMs but it's decline will not affect LLM development. LLMs will simply be trained on the conversations people are having with them.
Unlikely to happen with conversations, yes, but very likely to happen implicitly as part of work with coding agents. Successful agent trajectories will be used to learn what works and what doesn't for a given API.
And if usage declines, what will be feed future LLMs with?