Flip, I was really hoping for a good outcome to this.
Still, as you say, the mare is now the priority, and if she is OK that's all that matters.
IT is such a fine line between foaling early (which mine do all the time) and aborting, I am not sure there is ever a real "reason" as I have known cords twisted at birth and had the foal OK, I sometimes think the cord being twisted is just one of those things, after all, if the foal is dead, it would stop moving, and the mare moving around it would then twist the cord...just a thought.
Still, sorry you had to go through this, and sorry the mare did, too.
I always think it is such a waste when this happens.