Wot Diver 300 and Feanor said, plus:
I'm puzzled about how it could be impossible to get the thermostat out, yet OK to get the much bigger and longer heater out. And surely, its not vertical, but at an angle near the top of the cylinder, as the takeoff is at the very top.
Generally, removing immersion heaters is not a task to be DIY'd unless you a) have the required spanner, and b) know exactly what you are doing. It is more than possible to destroy the cylinder when applying enough force to undo it.
My own one is in a cupboard with 200mm of headroom above it. There is a circular hole in the ceiling above it (its a bungalow). Mine stopped working (it is the usual source of heat, powered by my solar PV), so I put a tester across the various terminals and decided it was the stat, so jiggled it out, and replaced it with the spare one which was lurking in the utility room when we bought the house, after testing both with a kettle of hot water, a thermometer and a multimeter.
If in the slightest doubt, and you can afford it, GAMI.