Thank you for your responses, it's disheartening to hear it's fairly common. I wouldn't want to totally rule out getting a female hamster ever again because of this, it was just sort of a traumatic experience going through this with my last ham so I guess I might want to adopt a male when I'm ready, just to rule out the possibility of going through this specific issue next time around.
My girl was about two years old when she became ill, and went into such a quick decline that the vet did not think surgery was an appropriate option, so it was management with antibiotics and painkillers until she passed (just before I had finally scheduled her for euthanasia). She was the best hamster in the world, sweet and intelligent and with this sort of kindness in her eyes. It's a shame that surgery is so tough on them and spaying can't just be a regularly performed procedure the way it is with other pets.