That’s definitely a fair statement. The House system can be toxic because the magical community of Britain is so tiny and insular that the pureblood parents especially take the whole thing dead seriously. Thankfully, the Hat knows better than any one family, but there’s definitely a cogent statement throughout the series about the gulf between the values that someone possesses and the effects of their actions.
Lockhart is a Ravenclaw. Pettigrew is a Gryffindor. They both exemplify the perversion that comes about by the pursuit of self-interest through knowledge (Lockhart’s plagiarism/identity theft) and bravery (Pettigrew’s worship of people stronger than himself). Lupin takes a long time to grow into his Gryffindor chivalry. Hermione has a whole dramatic speech in the first book about how she values bravery over books. That all totally makes sense to me.
I can see eleven-year-old Gilderoy earnestly wanting to learn, even as the Hat whispers that he would do well in Slytherin. At some point, Gilderoy’s maladaptive work habits turn him inexorably towards cheating. Combine that with his sociopathic interest in mind control, and things snowball over the years… The thirst for knowledge is perverted, as I think a lot of disillusioned students can attest.