capacitor or 2nd battery for invertor situation (automotive)
Welcome to the world of bad connections. 

Corrosion will happen any time metals that are different touch. Add in current, arcing and all the heat it brings heat you'll start seeing what you see. Fixing the battery connection to one that makes good contact and you might see a huge difference. 

You haven't stated the type of car, it looks like the battery is in the trunk, judging by the vent hose and tire. That would diminish the harsh environment of open engine bays. Pointing more towards poor connections causing heat, speeding up corrosion. as corrosion increases, electrical resistance builds up causing more heat. Add increased draw from the inverter and you are where you are now. 

If your using it a lot, you might want to look into a second full sized battery, with accompanying isolation. your amp won;t kill your main battery and you can jump start yourself.