One pin on the cable (male part) becomes oxidized (black) after time. One can rub the black stuff away using a regular rubber and it usually works again.
I've used contact cleaner and toothpicks to solve this problem before. It only works so many times, eventually it's just totally shot. I've never had a cable fray but I've had 3 or 4 lightning connectors become useless.
My first gen iPad Pro and iPhone 6s Plus say otherwise.