While some companies are reducing their workforce others are growing, some of this is because market share is switching. Traditional business losing to the cloud for example.
There is more software work today than at any point in history. This is only going one way. Until AI will be able to develop software at least.
With respect to age while there are pockets of ageism I think most of the big players and some of the smaller don't have a problem with anyone's age. There are still a lot of companies who can't find enough people regardless of age and I don't think there's a huge salary differential between someone really good in their late 20's to 30's and someone really good who is older. So there's really no economic incentive for ageism. Yes, you can hire someone out of school for cheaper but you need to invest a lot more in them and then they disappear for a more lucrative job...