Perhaps, you have misunderstood the meaning of "marginal cost." It does not mean that there is zero total cost. Marginal cost is the cost of producing the next kWh. Once my solar panels are installed (not necessarily cheap at all), the marginal cost of producing power is essentially 0.
You’ve basically mentioned it’s not zero since the cost of the spend on the solar panels would have a next best alternative and a hurdle rate. So each marginal kWh does have a cost, not to mention the depreciative factor.
Maintenance of the power inverter, batteries, wiring, and the panels themselves means that marginal cost is not zero, and as long as we don't know the solution to entropy, will never be "essentially" zero.
All of those things happen the same, and cost the same amount, whether 10 kWh are produced or 11 kWh. The marginal cost of the last kWh is zero for these items.
There is thermal wear on the power management and voltage step-up electronics, but it is small unless design parameters are exceeded in going to 11. So maybe those components would have to be replaced ten milliseconds earlier than otherwise.
Setting aside the article's mention of moderately intensive solutions like natural gas which has a very real and obvious cost per KWH, your panels will still need maintenance and eventual replacement (the current industry standard lifetime for a panel is 25-30 years), as will any peripheral systems required for the panels to work (batteries etc) and even the space they take up has an associated opportunity cost.
Marginal cost is the derivative of the cost function. Fixed costs drop out of the derivative. You’re confusing amortizing a fixed cost with marginal cost.
* provided you’re located in a region that has ample solar power.
Turns out, a lot of the world doesn’t really live in perpetually sunny or windy places.
The solar-wind cult would be hilarious if it wasn’t so tragic. Entire economies have suffered because they marched headfirst into solar and wind without understanding their own geographical limitations (prime example: Germany).