...and both were lifelong wizards who grew up in the wizard culture which on the whole sees absolutely no issue with enslaving an entire species. There are plenty of cultures throughout history that have committed horrific acts as part of their cultural makeup and it's people think it's good because of not knowing any better, it doesn't mean those horrific acts are actually good.
Newsflash, those cultures enslaved other humans. We know how humans work, because we're all humans, and it's safe to assume that our human relatives didn't like being enslaved either.
House elves (yes, I'm sick of repeating this) aren't human. So it's silly to transplant human concepts of slavery onto a species that doesn't consider their situation as such.
Also, as for Ron and Hagrid, while they do have blindspots, first, they're not unopposed to prejudice (see their reactions to Malfoy's mudblood insult), second, they're arguably beside the point. Hermione tries to 'free' the house elves, regardless of their own wishes. After the series proper, she does go onto help house elves, but in a way that's respectful to what they actually want. I'm not sure how that's a bad moral.
It's like time traveling to before the Civil War and asking slave owners or even just people who lived in the South if slaves like being slaves. Chances are very high especially if you're talking to the slave owners that they will say that yes, slaves love being slaves. Most of them might even genuinely believe it, despite slaves constantly trying to escape because they've never known anything else and are so used to having slaves and depending on them that they'll twist any logic into knots if not outright ignore it to avoid admitting that something they've spent their life benefiting from is wrong, as people do.
And how many house elves are constantly trying to escape? How many house elves willingly take the 'outs' Hermione gives them?
A bad track record in the past doesn't change the fact that Hermione is completely right in this instance
If she's "right," then the book is presenting us false information.
The House Elves detest Hermione for trying to help them and don't want to be helped because they've been conditioned to think their situation is right. Even if the House Elves aren't being magically compelled to think being slaves is good and thus their opinions can't be considered valid and genuinely think that Hermione should stop because being slaves is good, that doesn't make them correct. Just because someone thinks something is good doesn't make it actually good.
Well that's incredibly arrogant.
"You, Frieza, get off the screen now and stop talking about videogames! I...what? No, I don't care what you have to say, I don't care if reading/gaming makes you happy, I know better than you! Go! Scat!"
Yes, there are real-world analogues to what you've said (e.g. domestic abuse), but imagine applying this to, I dunno, religion. Frankly, I think people are wasting their lives believing in supernatural entities, but if your Sunday mass (or equivalent) makes you happy, if it gives you a sense of community, if you derive genuine fulfillment from your belief and aren't hurting others, why should I stop you from doing that?
Hermione isn't "spectacularly wrong," the story treats her as though she's wrong, there's a massive gulf between the story deciding someone is wrong and that person actually being wrong.
That's a contortion though.
A story can decide that the "hero" committing murder of innocents, rape, genocide, or in Harry Potter's case slavery is right with any number of justifications, it doesn't make any of these things actually right.
Well first, none of what you've cited is what the books can be said to support - any attempts at murder, rape, genocide, are framed as bad.
Second, "slavery is right." Again, you're transplating real-world slavery into a situation with a fictional species that don't consider it slavery. By this logic, Pokemon is slavery, because regardless of how a pokemon might feel about the situation (pokemon can develop bonds with their trainers, and working with trainers makes them develop faster than if they were on their own), regardless of any in-universe context, the situation is bad.
If the house elves were humans, then yes, maybe you'd have a leg to stand on, but they're not, and operate by their own principles and values, so really, you're being just like Hermione in this case.
Probably the same reason why the vast majority of people can tell that water is wet without having to jump into a lake first, because it's blatantly obvious. The wizards use of House Elves very very incredibly obviously is slavery. Slavery is bad. The only way either of these two things could be more obvious is if Dobby had a flashing neon sign over his head saying "SLAVERY IS WRONG!!!" End of story.
Then we're at a crossroads, because everything you've said is a convolution of what's actually presented.
On the other hand, House Elves are significant figures throughout the Harry Potter books, we're given a very close look at what they are, how they live day to day, what their values are, and the books do make dealing with them in one manner or another a significant plot point on multiple occasions. We see that the House Elves are enslaved because that's what the books show us. We see examples of House Elves that do things against their own will because they are magically enslaved. We see that House Elves are capable of not wanting to be enslaved because we have examples of individuals that want to get out of said enslavement. In fact, we're introduced to the whole concept of House Elves in the first place showing us that they are enslaved and that enslavement is bad in the form of Dobby.
Yes, we see individual house elves where all of this applies, and see examples of house elves where this isn't the case as well.
By the end of the series, we can safely conclude that:
1: House elves are happy in their station, in general, and don't desire freedom.
2: Because of their nature, this leaves them open to the whims of their masters.
3: As what actually happens, the best thing to do is to respect the wishes of the house elves, while also giving them as many safeguards as possible.
The problem with the House Elves plot line is it then subsequently turns around and then contradicts everything shown up to that point by acting like the enslavement of House Elves is a good thing because it's in line with the wishes of the House Elves. An idea that quickly falls flat with any sort of scrutiny whatsoever.
Contradicts what? We see Dobby in Book 2, see the house elves in book 4, where it's established that Dobby is the exception. Where the potential for abuse is there (see Winky), but as a whole, the house elves are fine, and don't want Hermione interfering with them.
How is any of what I just said a contradiction?
You do realize you just contradicted yourself right? You admitted that religious texts and pseudo-science are a fantasy and thus works of fiction, then in the next breath said that you've never seen anyone hold up a work of fiction and use it as justification.
Really? You're playing semantics?
Fine.
1: Far as I'm concerned, all religious texts are fiction.
2: People have used religious texts to justify attrocities.
3: The people doing so believe the religious texts to be true.
4: In contrast, everyone on planet Earth knows that Harry Potter is fiction, that house elves aren't real, that slavery in the real world is bad.
You're basically coming at this from a similar perspective to those who claimed the HP books would turn kids into witches/wizards.
With the clothes thing Hermonie was trying for something akin to the Underground Railroad. Help the people who are slaves now rather than being concerned about changing slavery as an institution. An indirect result of the effort to free slaves was that several former slaves led the fight against slavery that ultimately led to the Civil War and the complete abolishment of slavery. Helping a people now led to helping to stop what was making them as a whole suffer in the first place.
That's one hell of a stretch. Even if the house elves were meant to be a slavery analogy, that's really stretching things making it like the Underground Railroad. FFS, it's not even taking place in the same country.
Also, Hermonie was trying to form an organization that would ultimately bring down the institution that is the slavery of the House Elves. It only fails because the narrative reads it as shortsighted and stupid for her to so much as try when it was anything but. So yes, the SPEW plot can be considered a story about institutional reform.
And I disagree, the SPEW plot is an example of Hermione's arrogance getting the better of her.