Yes it's an interesting one, I thought I had posted in this thread but it seems not.
There are multiple aspects to the damage but the main one seems to have been a parallel power arc at the inverter terminals, evidenced by the loss of metal. So let's start with the question of what initiated it.
1) Voltage transient. If this were high enough to flash over those barriers, it would probably have destroyed the inverter, or more likely been absorbed by it. Examination of the innards might give some clues as to whether it's likely.
2) Momentary short by conductive object, unlikely if the covers were in place.
3) Carbonised insulation due to prolonged creepage over moisture. Unlikely due to covers and heat dissipation.
4) Carbonised insulation due to high-resistance connection overheating. This would tally with the cable insulation thermal damage, which is sufficiently different between yellow and blue phases and shows a sufficiently shallow temperature gradient along the conductor, that it seems unlikely to have resulted only from the heat dissipated in the arc.
5) Series arc caused by mechanically loose connection, inferences as per 4).
From just the single picture and no further evidence, I would say the most likely root cause is high resistance at the yellow and/or blue phase terminals, either the lug cimps or bolts or even the hidden internal connections to the inverter itself. This caused carbonisation of the terminal insulation, self heating and arcing resulting in a full parallel arc between the studs.
But then we have to consider the situation at the MCCB. We can imagine that it might spit out some vapour when clearing this fault, but we see insulation shrink-back on yellow and blue cables as though prolonged moderate overheating had taken place. So what caused this thermal damage?
1) Voltage transient. Could have caused a flashover both at the breaker and the inverter, but would have been equally likely to break down at any point in the panel, not specifically the breaker associated with the damaged inverter.
2) Failure of the MCCB to clear the fault promptly. Seeing that the fault is double-fed from the grid and the inverter, could the fault current have been low enough to endure long enough to cause thermal damage at both ends?
3) High resistance connections at the breaker, unlikely coincidence as above.
I'm struggling to make a coherent inference from this. More evidence needed!