Gas capped price is 6.87p/kWh, and with a boiler typically 90% efficient that’s equivalent to about 7.5p/kWh.
If you can buy overnight electricity for less than 7.5 p/kWh then it is cheaper to heat your water via electricity. Conversion of electricity to heat is 100%.
Definitely more wear and tear on a boiler than an electrical element, so factor that in too.
If your motives are to decarbonise, then you may wish to use the immersion heater above 7.5p/kWh electricity price, as along as your provider guarantees the electricity is from renewable sources and not partially from burning fossil fuels.