4 AWG? That is part of the problem.
If there is a 100A fuse on each battery, the combined current without blowing the fuse is 200A or more. That is too much for a 4AWG wire.
View attachment 100124
It appears there was a combination of problems.
1) Something inside the inverter created a resistive short that drove the current up very high, but still below the trip point of the fuses and BMSs.
2) The 4 AWG wire became a heating element.
3) The most likely place the wires got the hotest was at one of the crimps or ring lugs. In this case, it was one of the two where the wires were connected to the inverter.
So.... we do not know what caused the original short, but I am starting to get a picture of why it evolved into a fire.
Edit: Added the following:
To correctly set this up, there should have been a 100A fuse where the two positive wires come together or the wire should have been large enough to handle 200A.