There is no single fault that can cause short between primary side of transformer and the output connector casing, so it's OK. Also, isolation distances on orders of millimeters are relevant for open air or PCB breakdown (with PCB-air interface having lower breakdown voltage than air or PCB alone due to possible water condensation) and not for isolated wiring inside transformer. It's pretty hard to imagine any failure mode that would cause short between connector casing without also causing breakdown between transformer windings. The whole thing looks slightly over-engineered (L6565 seems to me as a bit of overkill for this application), but safe.
It's interesting to note that most cheap replacement chargers don't have significant safety issues but produce harmful EMI, on the other hand it's not too hard to find name brand power supply which have significant safety issues (eg. low impedance connection between otherwise unconnected ground of EMI filter on primary side and output ground), often caused by combination of safety, EMC and design/size requirements and weird interactions between them and between requirements of different jurisdictions (EMC, ESD and safety requirements of EU sometimes tend to be contradictory).
It's interesting to note that most cheap replacement chargers don't have significant safety issues but produce harmful EMI, on the other hand it's not too hard to find name brand power supply which have significant safety issues (eg. low impedance connection between otherwise unconnected ground of EMI filter on primary side and output ground), often caused by combination of safety, EMC and design/size requirements and weird interactions between them and between requirements of different jurisdictions (EMC, ESD and safety requirements of EU sometimes tend to be contradictory).