Just over a third of all electricity generated in the UK (35.7% in 2020) comes from gas, although the 5.4% of electricity which is imported (rather than being generated here) is likely to include a big proportion of gas-generated power. So, as a rough estimate, it might be around 40% in total of all electricity used in the UK that is sourced from gas.
On the face of it therefore, it would seem that increases in the price of electricity should be less likely to rise than domestic gas prices will because less than a half of all electricity production will be directly affected by the massive rise in wholesale gas prices.
However, with prices from gas-powered generation rising rapidly, electricity suppliers will then be competing to get their electricity from both nuclear power and renewables. That, inevitably, will push up the wholesale prices of such electricity, meaning that increases in domestic electricity prices won't necessarily be a lot lower than those for gas.
Even so, it might still be best to avoid using gas heating in homes at the moment, in favour of electric heating. So your plan would seem sensible enough to me.
Source for my figures:
https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/1006701/DUKES_2021_Chapter_5_Electricity.pdf