Because you can see some vaporized (and then condensed) metal on the insulating "islands" between the contacts, and this is not down at the actual contact points, I'm voting for a surge of some sort causing flashover across the "front end" of the male connector (the cable end or "plug"), that left material deposited on those insulation islands in the socket (jack).
It could have been moisture, but in my experience, that usually looks a bit different. The blobs of metal that was molten or even vapor at one point seems more like a brief high-energy event than a prolonged burn. But this is all speculation since anything is possible.
You don't need to have any kind of direct lightning hit to get damage. Two other mechanisms can cause damage from nearby lightning.
One is simply induction. You get a nearby lightning strike, and the very high current pulse creates an EMP event where you have intense electromagnetic radiation emanating from the lightning stroke itself, basically like an extremely powerful radio signal broadcast from the "antenna" created by the ionized path through which the current is flowing. Think of the lightning "bolt" as being a temporary transmitting antenna emitting a powerful pulse of radio energy. That radio "signal" is then "received" by any conductor anywhere nearby, and the received signal strength can be extremely high. So you end up with very high voltages being induced into wiring in the area even though no direct contact was made. Again, this is like an EMP event.
Another mechanism that I've seen do damage in many situations is that the lightning strikes the ground, or a grounded object, and that immense pulse of current flows into the earth at that point. Since the earth is usually a pretty poor conductor, that current flowing through that poor conductor (the dirt, etc.) develops a large voltage gradient from place to place through the earth in the area.
We know that by Ohm's Law, voltage is equal to current times resistance. Now, a lightning bolt might carry, perhaps, 10,000 to 100,000 amperes of current for a brief moment.
From setting up many radio sites, I can tell you that a "good" earth ground can be at least 25 Ohms. Dry earth is a crummy conductor! Now, imagine the lightning strike, carrying, say, 10,000 amperes, strikes the earth at one point. The current will spread outward from that point, traveling through the fairly-resistive earth trying to make its way to "ground" (whatever that is!). Think of a hemispherical electrical field spreading outward from the point of contact in all directions.
Now, let's say you have a ground rod driven into the earth 100 feet from the point of impact so to speak. And another one 200 feet from the point of impact. At the moment that this 10,000 amps of current is being dumped into the point of impact, the voltage gradient between these two ground rods might be many thousands of volts! Think of 10,000 amps flowing through 25 ohms. Do the math! That's a quarter of a million volts at the instant of the lightning strike.
Anyhow, even at points somewhat distant from where the lightning strikes, you will have voltage gradients in the earth that can be extreme.
So now, you've got what you imagine to be two points that are "grounded" together (by virtue of both places having ground rods driven into the earth). But the reality is that those "ground" points might instantaneously find themselves thousands of volts different.
I've seen nearby lightning strikes blow up all sorts of equipment, even within the same building, simply because different parts of the building are grounded in different places by their own ground rods.
So between the possibility of induced voltages appearing in any wire (which will act as a receiving antenna) and the possibility of highly different "ground" potentials from place to place, even a nearby lightning strike can cause damage.
The way we protected radio sites that were always on mountain tops, and always had tall towers, which, of course, are struck directly by lightning many times each year, was by creating a ground "ring" around the radio building, and providing a "single point ground" system where any electrical connection and even plumbing entering the building comes in at a single point, through a thick copper plate that is tied to the ring ground surrounding the building, but more importantly becomes the "single point ground" for everything inside of the building. Nothing is grounded by "daisy chaining". Instead, every piece of equipment has its own isolated ground wire running directly to that single point ground. Usually, a copper plate 1/4" thick, and large enough to accommodate every wire, pipe, coax, etc., entering the building.
Lightning arrestors are installed to the plate for every connection.
With this system, radio stations, repeaters, etc., operate just fine for many years despite the fact that the radio tower is struck directly by lightning frequently.
When the lightning hits, the tower, the ground around the building, and most importantly, the ground entrance plate all rise to whatever voltage is required at that moment. The whole works might momentarily find itself a quarter of a million volts away from "earth ground" potential. But it doesn't matter because all of the equipment is at that same potental. So no damaging voltages appear between pieces of equipment. So no damaging currents flow. It's all "relative".
People like to believe that there is no way to protect from lightning. But that's simply not the case. It's done all of the time or else no mountaintop radio site would survive more than a few weeks in most locations. And clearly, that's not the case.
Anyhow, the point is that we can't know exactly what happened in this case. It could have been a cut in the insulation of the CAT-X cable, shorting to a mains power wire, or it could have been a failure in the equipment at either end. Or it might have been moisture.
But don't rule out induced voltage or ground-potential-differences caused by a nearby lightning strike. Just being indoors doesn't shield you from either of these events. Believe me, I've repaired enough equipment, especially in larger buildings, to know that you don't need any sort of direct hit to have lightning damage.
Just one possibility, anyhow.