I think you have the right idea re. removing the dead ones. When I've done something like this before (one of my fish got stressed out and dropped too early) I remembered that the babies develop in eggs, hatch inside the mother and then are born. So I did what fish that care for their eggs do - current (egg fanning) removal of fungus (egg cleaning) and removing dead eggs (eating infertile eggs). Methylene Blue is very good at protecting eggs from fungus. I used a cheapie whitespot remedy also containing formaldehyde, at 1/3 recommended dosage. No fungus.
I'm not sure if the eggs will hatch normally (mine were smaller than yours and they all died). Sometimes a female giving birth to full-term fry drops some that are still in their eggs. I've had a go at removing the shell with tweezers but it's hard to do it without damaging the fry. Usually the fry gets its tail damaged and I feed it to the other fish. Next time I might clove oil one and see if making it stop wriggling helps.