The problem is that heat pumps exist, so resistive heating is never the best option.
An aluminium smelting at home heating solution would have a maximum CoP of 2 (as you're reducing the energy usage of the smelter by the same amount). A heat pump could easily have a CoP of 3 or 4.
You have that math backwards. A smelter turns ~1/2 the energy from electricity into chemical energy and releases the remaining 1/2 as heat thus the COP would be 0.5 not 2. However smelting is profitable because aluminum oxide is less valuable than aluminum which more than compensates for the waste heat having zero value at the smelter.
Thus various schemes for combined heat and power etc which take the valueless waste heat and use it for some other purposes like warming homes or greenhouses etc. So while the COP would be 0.5 the electricity would be subsidized by the smelling process. https://en.wikipedia.org/wiki/Cogeneration
Where such schemes fail is generally economies of scale.
An aluminium smelting at home heating solution would have a maximum CoP of 2 (as you're reducing the energy usage of the smelter by the same amount). A heat pump could easily have a CoP of 3 or 4.