Lightning ports very rarely fail or get loose - it’s more robust than usb-c in that regard, which is already a high bar - it’s probably dust in the port
And now that they've disconnected the thunder-bolt adapter too.
I know the quality is less than my XR. I own both and I have a box of three thunder bolt to audio cables, all have the same issues.