Most of it can be electrified. NYC has banned gas hookups in new residential buildings (I live in one and it's great). Industrial electrification will never be 100% but I've seen estimates as high as 90%. It will take time and money but it will happen.

how much time and money, and whether it’s worth the opportunity cost, is the entire question.

If you're considering the total cost then you have to factor in the entire reason to electrify which is the environmental cost of continuing to burn dead organic matter. In that case, electrification is absolute bargain.

to what end?

I just said. To reduce environmental impacts. A fully electric factory drawing power from a grid of renewables is cleaner, safer and more stable.

so it sounds like "bear infinite prosperity / comfort / security costs for dubious environmental benefits" . Have you thought about how to weight the costs vs the benefits? Are you proposing being poorer, hungrier, more miserable, less comfortable in the hot & cold season for "clean energy". so how much are you willing to sacrifice for it?