It sounds like the first issue was the charging port in the laptop has been damaged/worn out; and needs replacing.
If the damage to the charging lead is far enough away from the plug, you could cut the damaged section out and splice in a new length of cable; if the damage is right next to the plug, you could buy a new plug, then cut off the old one and fit the new one.
The alternative is as above; buy a new charger; however you really need to get that charging port replaced, and that means taking it to a repair shop.
A bad connection causes heat; heat damages the plastic insulation, either melting it or making it brittle; this is probably what caused the damage to the charging lead.