when a good and working charger is being plug-in. This trouble may cause by a damaged charging pin connector or an oxidated charging pin terminal contact pads.
Replacing and or by cleaning it will definitely fix the problem.
In some cases like a wet damaged Nokia 5220 there are certain components that may also get damaged like the charging fuse and or the protection diode. The solution below shows where this certain components being mounted or located on Nokia 5220 PCB board.
Nokia 5220 Xpressmusic Charging No Response Solution
You may check those components showed on the solution above and replace if found damaged.
You may start to check the fuse if already busted or cut-off, then down to the filter coil and the chip diode.
A shorted diode may cause the fuse to blown or breakdown. Replace it if its already shorted.