I've just checked a typical small SMPS board I had lying about and the Y capacitor (between output 0V and the negative of the primary side DC bus) is 2.2nF. The
HBM equivalent capacitance for ESD testing is 100pF. Real life capacitance of your body to ground may well be lower - it depends on geometry (i.e. proximity of nearby objects at ground potential), thickness and material of your shoe soles thickness and type of flooring, etc.
Assuming 100pF and direct contact with the plug shell and thus secondary side 0V, the charge will equalise with the Y capacitor, reducing the voltage by a factor of over 20, reducing a 50 kV HBM charge to under 2.5 kV, which for better quality SMPSes is within their insulation withstand ratings. The charge then slowly leaks away to the primary side via PCB surface leakage etc.
Of course if the charger is a 'CE - China Export' low grade piece of cr@p, it may not even have a proper Y capacitor and there is a high risk of a 50 kV HBM ESD event causing insulation breakdown leaving its output a mains live shock hazard!