For example, the KKK is horrendously ostracized in this country. And I think that's OK. But while they might be ostracized, KKK members still enjoy their rights, they still have the opportunity for free speech. And I think that's important too. I wouldn't equate the ostracization of open racism with McCarthyism and I don't think most folks would either.
The lesson from the McCarthyism scare isn't that ostracizing people for their beliefs is wrong. That's a valuable, even essential, function of society and an important aspect of free expression. Although we should definitely be careful in its use. The lesson is that hounding people for mostly private activities or activities in their past is wrong, and conducting public witch-hunts using the power of the government where the flimsiest of evidence is allowed to decide someone's fate is also wrong.
Let's go to first principles here. Which, for America at least, come down to equality and liberty. Principles enshrined in the founding documents of this country. Oppressing people because of their sexual orientation is not a neutral proposition in regards to those principles, it is very much an exception to the principles of equality and liberty.
The two scenarios you describe are NOT and have never been symmetrical.