However, there's no reason that the electricity has to come from fossil fuels. Aluminum refineries are an incredibly useful base load, able to turn up the heaters when energy is available and inexpensive, but to reduce the load when energy is less available and more expensive. This is highly compatible with renewable energy sources, providing a useful sink for excess capacity.
Aluminum production can and will continue well after fossil fuel energy sources are phased out, at which point it will have a lower environmental impact.
Also, aluminum is extremely easy and cost-effective to recycle.
Unfortunately, I don't think we are there yet.
Unlike plastics, metals are recycleable wirh 100% efffectiveness, the later product is not lesser or worse quality.