Personally, I think my first book, 10 years ago, was my best book but it sold much worse than my later books because the topic was too niche.
Also, there are many, many more programmers now than there were before. Maybe they don't read books as much as their predecessors did, but to say Stack Overflow and open source platforms killed technical book publishing is highly inaccurate. I honestly think you're projecting a "you" situation to talk about the whole market. Please don't take that as an attack, but just as an additional perspective.