Surprisingly when things become heavy enough the ground by itself isn't enough anymore and you start needing supports for heavy things
I would assume the cost of the batteries (and then after that things like inverters) is still so high everything else is in the noise.
That puts your number at. (3k4010) / (16k*2.2) (estimating width of the 40 foot at 10 feet),
Uhh.. 34 containers. I think that's enough.
In reality you would be able to drive helicoil foundations or any number of things to change the dynamic. I agree the foundations would be secondary to the rest of the system cost in general though