Why do the capacitors inside the inverter heat up?
By inverter, I assume you mean a motor speed control inverter or variable frequency drive (VFD). The VFD DC bus capacitors carry the reactive part of the motor current. If the motors have an unusually low power factor, they may not be adequate. Even if they are adequate, they may be the most vulnerable component in case of difficulty with cooling or excess ambient temperature. You should review all of the operating conditions including the motor nameplate information, the VFD nameplate information, operating conditions, VFD settings and VFD instruction manual guidance. You should examine the cooling air flow path and heatsink surfaces. You may need to establish a regular cleaning schedule. You should discuss the problem with the VFD supplier. It may be possible to modify the VFDs to make them more reliable is your usage conditions.