I have had most success with livebearer traps that are big enough to leave the females in almost permanently and that way the female and the fry avoid stress. I used to remove the female and fry a few weeks after the event, and put the female back as soon as she is obviously gravid, but way before giving birth.