Is this...an overreaction...?
I can't speak as if I'm a native there, but everyone interprets the laws of their country slightly differently. There's also the debate of the letter of the law versus the spirit of the law, and thus, I feel like situations like this need to be taken in context.
Wikipedia's interpretation of the law (which is not the actual law because I can't read Polish) suggests that the law which banned Communist/totalitarian symbols was actually struck down due to being unconstitutional.
In 2009, in Poland § 2 to 4 were added to Article 256, which ban "fascist, communist or other totalitarian symbols" unless used "as part of artistic, educational, collecting or academic activity." On July 19, 2011, the Constitutional Tribunal of Poland found this ban unconstitutional due to the violation of freedom of expression. In June 2017, Poland updated its "decommunization" legislation to include Soviet propaganda monuments, prompting negative reactions from the Russian government.
So...your argument isn't really based in law in that this is not allowed in Poland unless you can cite another reference to demonstrate that it is...and if that's the case, I'm perfectly happy to eat crow.
I do see that your argument against the hat is an emotionally charged one, which is a perfectly fine one to have - heck, my group of friends and I get triggered any time we see someone in a red hat. That's going to take eons to get over, honestly.
But I want to draw a line - not liking a symbol is not the same as the symbol being actually illegal to use in Poland. Then again, you're really not under any obligation to wear the hat, either...
But I also want to call attention to this because what seems to be the official word on this is that this hat won't ever appear again. Emotional feedback is easily actioned upon, whereas thoughtful and rational discussion seems to happen after the fact.
That is disappointing. I find that unacceptable.