I don’t think comparing anything to nazism is bad, if you are making clear what the comparison is about.
if you are trying to say that something is as bad as the holocaust when it clearly isn’t, then you deserve to be pulled up on that and it’s not a good thing to say.
But comparing authoritarian, ideology-pushing, bullying behaviour, especially by the state and its institutions, to nazism is a political point that it should be OK to make. Especially because, like many horrific totalitarian regimes, nazism started gradually with what appeared to be or were presented as positive, socialist/progressive values. When you see “social justice” tipping over into persecution of wrongthink or of a group with a particular belief, it’s important to be able to point out where that’s led in the past.
How are we meant to learn the lessons of history and avoid repeating them if it’s illegal to say “hang on, this is reminiscent of nazi germany”? If someone says that and is wrong, they can be debated with and their mistake pointed out. It’s called debate.