What part of a mobile phone charger makes it safe to be charged with opposites polarity?
The input power supply is AC therefore, on a two-prong charger, the polarity is immaterial because it's always changing/alternating at 50 or 60 times per second: -



Internally the charger uses a bridge rectifier to convert AC to DC and it is the DC that does the charging. The polarity of that DC does not change when you rotate the charger.