I was using Safeguard (fenbendazole) on my pregnant mare but was told by another user here on the forums that it's not a good choice on mature horses, to use ivermec instead and that it's safe for pregnant/lactating mares.
Ivermectin is safe but don't use it before day 60 and don't use it the last 30 days. And do NOT use ivermectin gold or quest or anything with something added to the iver.
I have used strongid and Panacur too but only occasionally and only after day 60 and before last 30 days. Read each package.
Hopefully it was early enough that the blood supply to the fetus wasn't established yet and baby didn't get any. She is still pregnant, so they do survive in spite of whatever we do. LOL .