It is with great sadness that I have been reporting the death of one of my zebra-breeding females

A week ago, I saw a couple of zebras inside a cave. After four days, they were still there, and I could see the female with body bruised, pale and slightly red. I thought it was due to trapping and I was waiting for her to spawn and leave the cave. After more than two days, I decided to illuminate the cave, and to my great sadness, I saw some eggs have hatched and released in the ceiling of the cave (deads) and also the female dead on the bottom of the cave and the male still trying to take care of frys ... Immediately I decided to take them all out of the cave, including having to break the cave because it was glued with silicone. The male was apparently healthy ...
The other zebras from the aquarium also appear to be well, even there is another cave with spawning being cared for by the male

Despite the sadness, I have kept me relaxed and calm because I think and believe that if conditions of the tank were bad , not the spawning had occurred. I know that I must urgently provide another tank to divide the colony, because I have more than 20 babies at a refuge-aquarium attached to the main tank.
My questions are: would you have added some medicine in the tank?
Have you seen any death occur by trapping? I imagine that the female was trapped for some time, because to die for a secondary infection and eggs have already hatched, do not happen in just 5 days ...
Well, that serves only to reporting and learning, but I will not advise anyone to stop trying to reproduce the zebs for fear of injuries that may occur during the trapping.
Greetings
Luciano