your cast iron lasted much longer than intended. I have a 30 year old home that had complete rotted out cast iron that all had to be replaced and I am on a slab foundation.
So, cut away the cast way past the damaged section on both ends. be careful with any banging of the cast iron. use PVC definately and consult a pro on the union device. I am thinking of rubber unions. Get other opinions.
They used rubber on my cast to joing the comode drain pipes. then ran complete PVC.