I think it's useful to think in terms of cars. I'm actually doing an EV conversion right now, and I have a motor controller that puts out about 100 kilowatts of 3-phase AC. It came with the motor so I don't have an exact price, but fair market value is probably around $1500. (That's retail cost in quantities of one. Wholesale cost is presumably somewhat less.) It weighs maybe ten pounds or so. That's adequate to power probably about a dozen houses. I don't know if it puts out a sine wave or a square wave. Even if it's the latter, you could imagine a hundred of these things putting out square waves with, say, randomly-varying pulse width and having it average out to a sine wave. There's probably better ways to do that, but anyways the point is that we do have the capacity to switch enormous amounts of power in a very small package for pretty low cost. It's actually kind of amazing.
Maybe if the batteries feed into an HVDC line or they're co-located with a solar plant, then you don't even need to deploy more inverters.
A battery management system for my conversion is a little over a thousand dollars for a setup with about 48 cells. In a big installation you could amortize BMS costs by using bigger cells, or placing them in parallel groups -- the downside being that it might take longer to notice if a cell is going bad. My BMS is made by a company that caters to EV conversions; they're doing low-volume sales. A major utility ordering the equivalent for hundreds of thousands of cells probably can get a nice volume discount.
As far as foggy winters go: renewable energy needs to be traded over a wide geographical area. Purely local generation doesn't really make sense, unless you have some useful purpose for unpredictable amounts of surplus energy. Wind power would need to be a part of it. Even fossil fuels are a reasonable option as long as they're not used very often. Running natural gas plants for a week or two in the dead of winter or in case of grid disruptions seems like a reasonable use of fossil fuels. Indonesia has a lot of land outside of Java. Even Java is pretty sparsely populated outside of cities. Most of it is jungle which we'd like them to keep and farms, but solar doesn't need to take up a huge percentage of available land. Even solar panels on roofs can go a long way.
If we imagine a near-future scenario - a battery powered house heated with heat pumps, driving an electric car, during central European foggy winter, which tends to last for about a week at a time. Let's say they use 60kWh/day. We're looking at $100k just for the batteries and installation, even assuming electricity comes free. In ~15-20 years, the batteries reach their recommended cycle life, requiring a choice of another $100k or accepting that what used to be a 3-day storage becomes 2-day
This is not some "extreme situation". It's a completely predictable scenario that recurs with near 100% probability every single year. Then there are places like Ganges river, Bangladesh or Indonesia, home to hundreds of millions of people, where neither solar, nor wind is viable (and land is scarce)