I would think Nightmare Before Christmas is a more popular franchise simply because it's more accessible to a much wider audience. Anyone, anywhere can pop in the DVD and watch the movie, but to really experience the Mansion you have to physically be there. That limits the fandom of the Mansion to a much smaller audience, and that definitely has an impact on things like merchandise sales and impressions.
The split between the regular mansion and NBC mansion isn't all that great is it? About 5 months versus 7 months? I know they add things to the NBC seasonal offering to entice people to visit each year so maybe that has an impact too.
I have no doubt that to execs and synergy execs, HMH serves a more obvious choice.
But that also would be an argument of how clueless they tend to be. If anything, Haunted Mansion should be treated with more respect as a theme park attraction that is universally recognized as a one of the best achievements in the industry, period. It has been around 50 years, which may not seem like much in the context of Disneyland specifically but is a really, really long time for any attraction in the themed/amusement industry to be around. It's still around for a reason-it's pretty damn good, and everyone with a brain thinks so.
It doesn't need an IP to justify its existence because quality will out. By contrast, you can't argue that the artistry of something like, say, Frozen Ever After is so good that it would be getting the lines that it does if people weren't so obsessed with that particular franchise.
Will people still be obsessed with Frozen enough to justify keeping Frozen Ever After for 50 years? Because if you don't already know who the characters are, I can't imagine a rather basic boat ride with a bunch of characters singing variations on "doncha wanna meet Elsa?!?" the entire time with a random snow monster and a whee! backwards! section is going to do much for you.
By contrast, everyone understands the concept of a Haunted House. You don't need to educate yourself with a backstory beforehand to get something out if it. You know, that thing Disney used to be really good at with its attractions until sometime in the Eisner/Iger years.
Additionally, you mention that you need to be there to experience it as if that's negative. If anything, it makes the original Mansion more valuable. It is a reason to go to Disneyland because you can't do it at home, and that's valuable in an age where people are increasingly finding (and enjoying) that they can do a lot of things they used to have to go out to do from the comfort of their home. If I want to experience my favorite Disney character of choice, the most sensible thing to do is to get a DVD player or streaming device. This is especially true if the ride featuring the character isn't actually very good. $8 a month to watch Monsters Inc on Disney+, $30 to own it, or $120+/person for a mediocre attraction that doesn't live up to the film? You can imagine the choice most peole make. It becomes all the more tempting to play the Toy Story Mania video game you already own then get off the couch to experience the ride through version of it, because when all is said and done there are only so many merits for that particular attraction, and not enough for "effort" to triumph over "easy." But to ride Haunted Mansion, there are only three places in the entire world I can go (or, from mid August to mid January, 1 place). Places that are going to make Disney a lot more money in a single bound than a $7.99 monthly D+ subscription split among a family or group of friends. In that way, a ride like Haunted Mansion becomes a better investment than DisneyCharacter the Ride: great attractions are timeless. Cheap tie-ins aren't long term draws and will be gutted down the road when the public tires of the franchise and then realizes the ride isn't good enough to justify its own existence.
For me, Haunted Mansion is absolutely a draw and I couldn't care less about Nightmare Before Christmas. Am I irrelevant because I'm not in the more profitable demographic? At any rate, putting an entire attraction's worth on the amount of merchandise it sells is a terrible metric, and if Disney went all the way with that, you'd lose a lot of great stuff and be left with a lot of junk.
re: HMH's season specifically, There are two problems with it. The first is that the original Mansion, y'know, the iconic one, cannot be experienced during the Halloween season, and HMH definitely leans more heavily on the Christmas side of things than Halloween. And of course whenever there's any refurb or maintenance work that needs to be done, it always comes at the regular ride's expense-never the overlay. If the attraction's season was shorter and the refurb schedule balanced more equally, a good number of the complaints on boards like these would go away.