Which of the various EpEver MPPT controllers do you have? The "BN" models might have a bit more headroom than the "AN" models, due to a superior heatsink. As 12voltinstalls just described, "520 Watts" divided by 40 Amps is around 13 volts (a slightly low charging voltage, even for the case of lead acid batteries). Higher charging voltages increase the maximum power in a linear way.
When batteries don't need charging, or will accept only a small amount of current, the EpEver Solar Charge Controller (SCC) will leave a lot of "available" power up in the panels, unused. If your 4 panels create less than 30 Amps of current at rated output, most of the EpEver SCCs will handle them fine. If you can configure them series+parallel 2x2, you should have much less maximum current than that, while still having disconnected voltage well below the EpEver limit. It depends on the characteristics of your panels.
On less-than-perfect days, "excessive" panels are good. I have about 600 Watts of rated panels on my own EpEver 30 Amp "Tracer BN", and it never even gets warm. The user manual indicates that only '390 watts' are usable (at "12V"), but that's manifestly understated. I actually push upwards of 450 watts through the SCC in good sun conditions. I would personally feel very comfortable with your configuration on a 40 Amp Tracer "BN", but obviously can't guaranty it for you.
The wire size between the battery(s) and the Inverter depends on the Inverter, of course.