If I remember correctly, Poland’s secret is that the jews where being
blamed all over europe (as usual) as scapegoats for the black plague.
Poland was the only place that accepted Jewish refugees, so pretty much
all of them moved there.

Now, one of the major causes of getting the plague was poor hygiene.
This proved very effective for the plague because everyone threw their
poop into the streets because there were no sewers, and literally no one
bathed because it was against their religion. Unless they were jewish,
who actually bathed relatively often. When all the jews moved to Poland,
they brought bathing with them, and so the plague had little effect
there.

Milan survived by quarantining its city and burning down the house of
anyone showing early symptoms, with the entire family inside it.