The OP mentions the decline of the 'main' brands, which as already stated is down to more choice. That is different question to a 'decline' of the guitar market in general.
Both Fender & Gibson have models to compete at various price points & I'm sure they sell loads of their budget & mid-range instruments too, so it isn't just about the price of their top end products either.
Fact is, there are more brands for us punters to choose from these days. Think of the impact Sire basses would have had on Squier & Fender MiM bass sales for example.
Also, I'm pretty convinced that neither of those 'premium' brands actually carry as much prestige as they used to for players either, & haven't done for many years. There's many of us BC's for example that happily gig without say Fender on our headstocks. That might not have been the case as much 20 - 30 years ago.