...However, the materials currently used to make solar panels, windmills, batteries, and so on, are also a limited resource...
Unlike carbon-based fossil fuel; we don't
burn solar panels, windmills, batteries, and so on. Unlike carbon-based fossil fuel, much of the material can be recycled, reused, or repurposed —
because we don't burn them up. So, there is that difference.
Additionally, renewable energy sources like solar panels and windmills can produce energy for years. Fossil fuels produce energy for an instant and then you need more fuel — a steady stream of fuel being burned up which cannot be reused or recycled; but the remnants, like CO2, do accumulate and remain in the atmosphere for a great many years. So, there is that difference as well.
...We need to concentrate more research on alternative batteries which use minerals which are more plentiful.
Imagine a battery which is half the price of current Lithium-ion batteries, half the weight, double the capacity, double the durability, does not use scarce materials, and is completely safe from spontaneous explosion. That would go a long way to solving the unreliability problem of renewables, wouldn't it?
There is a vast amount of research and development underway to develop new and more efficient forms of energy storage of all types — battery, thermal, mechanical, cryogenic, air, hydro, etc. — to fit different locational needs. A good source of news on developments is
Energy Storage News.
But that's just a fairy tale, isn't it? 
