Yeah but even then when there WAS a D&D release it was back to number 1 for the next month or so before dipping back down so publication schedule had something to do with it. This trend continued with the adventures that were system neutral for Baldur's Gate and Siege of Dragonspear with the Next preview rules in them. So the Batman vs Spider-man analogy still stands. There was no Batman last week so Spider-man was more popular than Batman, there is Batman this week so Batman will stomp Spider-man for a few weeks and eventually there won't be either in the theater but Batman is the 800lb Gorilla of comic book movies. That is the standard bearer for the genre and while others have outgrossed in the meantime, it always comes back swinging and this is the first Batman proper since Dark Knight Rises after the Batman vs Superman sort of failure (872.2 million is massive) as representative of the 4e run and Justice League as Essentials.
Now I am not saying lack of publication killed D&D or trying to compare the model for 5e to late 4e. By then 4e was a confusing mess as far as what to buy, the errata, the sheer volume of material and the insistence and necessity of the DDI subscription to get things right. It was ahead of its time really because... 5e succeeded because of D&D Beyond, a slow publication schedule and higher focus on quality products with stringent criteria and telling a story. Then VTT helped D&D succeeded in the pandemic due to ease of access and the simplicity of the product line. "This is the core rule book set and these are adventures you can play if you want". That small product line that COULD have been a curse is a blessing to 5e in my opinion.
We will never know what could have been, of course. My biggest could have been is what could have happened if the release had not been rushed. They've stated that the power and AEDU structure was intended to primarily be for wizards, it was never intended to be applied across the board. What if Essentials had been integrated into the initial release? What if they had had a little more time to iron out issues or done a broader playtest? We'll never know.
But ... I think we need to look at a little history here. The core rules PDF for 5E was released in July of 2014, the PHB in August, the DMG not until December. I remember calling around to game stores trying to find a copy of the books because everyone was selling out as soon as they got any. According to this chart D&D regained top spot almost immediately, perhaps not surprising considering all the playtests, free PDF (great marketing there if nothing else) and being a new release. But it didn't just boom and bust like other editions have, even with very minimal product release they saw double digit sales growth almost immediately.
On the other hand CR didn't start streaming until March 2015 and it took a while for it to take off. Even now, the number of people that watch the show is a fraction of those that play the game, we'll never know how many people would have played if streaming had never been a thing. DndBeyond wasn't released until August 2017, the first online character creator crashed and burned in not-so-spectacular fashion.
There are many, many factors to 5E's success. While nothing's perfect, it's a decent system. They didn't go after the hard core optimizer crowd and instead by luck or design created a game with wide appeal. They didn't flood the market with product, the first non-core, non-adventure book was the SCAG a year after initial release, VGtM a year after that. The core books continue to sell amazingly well and they realized that having a PHB 2 was confusing to potential customers so the core books continue to sell amazingly well.
Beyond that? I think people were looking for a way to reconnect that didn't involve social media and this odd disconnect of friends that you never actually have a face-to-face conversation with. Of course the acceptance of enjoying things like comic book heroes helped as well. After all of that add in streaming, DndBeyond and probably a half dozen things I haven't mentioned and here we are.
There are times when it feels like people are looking for an excuse as to why 5E is more popular than their favorite game or edition. I think the biggest factors are that it's a decent system with broad appeal that happened to ride the wave of a cultural zeitgeist that was looking for something like it. I'm not convinced any pre-5E version of D&D could have done that.