Flexible cables usually have a number of small wires inside. It sounds like most of the wires inside the cable have broken. This increases the resistance to electricity and causes the cable to heat up. Wiggling the cable causes more of the wires to touch and lets some electricity flow.
You should be able to replace the connector at the end of the cable. Find the point where the break is by bending the cable so that the charger LED goes on and off. If the break is in the middle of the cable you can cut out the broken section and solder the cable back together. If the break is near the connector - which is the usual place - you will have to replace the connector.
If you haven't soldered before I suggest taking the adaptor into a electronics repair shop, or have a friend who is experienced help you. They will be able to replace the connector for you. Sadly though, it's often cheaper to replace the adaptor than it is to pay someone to repair it for you these days.