A cable that charges only at certain angles, disconnects repeatedly or becomes hot may have internal damage; replacing it is safer than relying on tape or continued use.
Internal wear often begins near either connector, where repeated bending, twisting and pulling can break metal strands beneath an apparently intact outer sheath. Intermittent charging does not prove that the cable is safe.
With fewer strands carrying current, resistance can rise and produce concentrated heat around the damaged section. The risk may be more noticeable during fast charging, and a hot connector, softened plastic or repeated disconnections are reasons to stop using the cable.
Electrical tape can cover visible damage but cannot repair broken conductors. Trying a known-good cable and, if necessary, another charger can help distinguish a cable problem from a damaged device port or charger. Replacing a worn cable is safer than continuing to bend or prop it into position.