That contactor does not look good. It looks like heat to me. I dont know if it is heat from manufacture or what, but it looks to be from operation and you said they were a clickin. In the image, i think i can see a witness mark of vapor deposit above the contacts, far right, on the underside of the boss, could be a reflection/blur.
What does the contactor switch? Can it be manually bypassed or replaced with a switch or wire nut even? What else does the equipment do besides bind circuits and provide a meter and shunt?
Can you omit the thing entirely and fly blind on the meter side?
If you post the make and model, we can find more, so far i got hoffman, interesting back story there... and the blurry c$$&&* seattle wa.
I bet you will pick up some extra usable watt-hours by omitting or updating this.
The good thing is, a person familliar with electronics could easily diagnose and repair this. The value for the contactor coil, and a check of the switching control and other connections, etc. Looks like a ceramic resistor and diode ( blue wires on contactor), and a transistor resisters, etc., clumped on a heat sink (red and white). These areas could be checked.
I am not qualified in electronics, but i can say that you
should bypass the contactor and direct wire what is required to keep the inverter and charging equipment connected inside the enclosure. The contact points will eventually fail and may arc catastrophically. It needs a cleanup if not updating. The raw holes with battery, pv and other wiring through burred holes is a worry, although i have done the same for quick, temps and such, and there appears to be no damage to any wires, the engineer in you has to have already wrinkled your nose in there!
I can point you here for great equipment. They have something that you can likely idendtify as replacing and enhancing the function of the failing equipment in your system.
Midnitesolar.com