Had a similar problem several years ago. The AC main breaker was 18-years old. I could not figure out why the breaker was tripping because it seemed to test well. Then I looked a little more closely at the 30 amp AC lead from the shore power connector. The AC power lead was in a wire bundle wrapped in spiral wrap and was not easily visible.
The attached picture was that AC power lead where it connected to the back of the circuit breaker. There was a lot of corrosion
on the filaments and they were developing high resistance and heating
up when, during the winter, we plugged in a 1500 watt electric heater
and ran the 750 watt water heater
while doing the winter evening liveaboard
things. I measured 2.5 Kw thru the lead after I replaced all the wiring
between the shore power connection and the AC breaker. That is a lot of heat!
I was very lucky the AC panel had not burst into flames.