I agree it was not very well thought out or planned but she was 15.And she wasn't very wrong about House elves liking their situations because they didn't know any better.They didn't have any rights at all.
Not all elves were perhaps treated badly but we have seen them being punished for things they have no control over.
I think Hermione's passion for social justice is a good thing, but at that point in her life she needs to learn to actually speak with, and be willing to listen to, the people she's advocating for instead of assuming they need to be told what's right for them or tricked into accepting it.