Had a closer look at the bike this morning and I’ve taken the rear mech and hanger (pictured below) off.
I was worried I’d deformed the frame or ruined some threads in it but the threads for the hanger are in the hanger itself, and the frame is unscathed. The spokes in the wheel that the mech collided with all seem fine, as well.
The hanger definitely needs replacing. Although it’s not obvious from the pic, it’s properly bent out of shape. Fortunately I’ve found one here https://www.rearmechhanger.com
£13 including delivery. I don’t know what a new mech will cost yet! But at least I’m not going to have to convert the X to a fixie.