Chosen Solution
That was an actual spark. I just experienced the same thing and I was scared so I came on the internet for answers and I found your question. Many people have shared similar experiences in the Apple forum so I guess it’s not uncommon. Actually, I doubted it was a spark so I had to deliberately brush the Lightning tip of the cable against the Lightning port on my iPhone 5s and it happened several times again. My room was also dark and I’m sure that’s why I was able to witness this. The phone and cable are working normal. I guess it’s just physics physicing (whatever this means lol).
Anxiety is wonderful, ain’t it? I think you’re fine. It’s all charging happy, and there’s no damage to the connectors, so it might have just been a tiny bit of static discharge, or reflecting light. Either way, I don’t think there’s anything to worry about