I haven't played much Stellaris, but to me the gameplay loop of HoI offers much better replayability and a clear goal from the onset: win WW2. The time period definitely plays a big part, it's not for nothing that the biggest FPS franchises were built on games set during WW2. It's also no secret that PDX lacks any serious competition in the grand strategy niche they basically own at this point.
HoI is a more modern game compared to EU4, I find the UI, warfare mechanics and "rewards" (numbers) far more enjoyable. I'd say there are 2 aspects EU4 has HoI4 beat: diplomacy and trade but to me warfare matters more; of course they're both excellent games in their own right and they have been steadily improved over time. One trend that is true for all is that major expansions really drive engagement and an unsuccesful one can mean a big decline in the playerbase for months to over a year. HoI has done very well in that regard, CK3 not so much and EU4 only had minor changes to gameplay (makes sense given the upcoming release of EU5, though I haven't played the last few updates). CK3 becomes incredibly boring and repetitive even in the mid-game. As for Vicky 3, well rocky launch for sure but not enough to threaten the IP like Imperator Rome. I find it very different mechanically compared to the other titles and I can't say I enjoyed it last time I played, hope that will change.
HoI4 content creators also play a big part in the popularity of the game, Isorrow, Bokoen1, Bittersteel... to name a few. PDX does an excellent job of collaborating with them and most of the big HoI4 content creators have a wider audience compared to those that focus more on EU4.
We can definitely be grateful for the hard work and mod friendly approach at PDX as there are many other game publishers that are hostile to modding and entirely focused on the bottom line. The devs are also fairly reactive to feedback and bug reports, which isn't always a given even for AAA studios. There is also a clear drive by the team to broaden the player base to countries and regions that had no focus trees, I do think that also helps bringing new players to the game.