The relationship between parasites and hosts is kind of an arms race. For every way an organism finds to rebuff a parasite, the parasite seems to be able, eventually, to find a way around it. Those types of organisms have found ways to survive just about every chemical and mechanical attack, even to physical dismemberment (chop up some worms, you get more). As a matter of fact, while ivermectin is an astonishingly effective antihelminth, insecticide and anti-viral, and even seems to be useful in fighting cancer, resistance to the drug is already being seen in a group of parasitic nematodes (Martin, Robertson and Choudhary, 2020, see link below). Thus, increasing parasitic resistance to this wonder drug is a serious concern.
The going thought is that ivermectin binds to glutamate-gated chloride channels in the cells of nematodes and insects; it basically holds these channels open, allowing a chloride ion influx which causes hyperpolarization of the cell. So, changes in the chemistry or cell wall physiology in parasitic nematodes or insects, for instance, could make the parasites resistant to ivermectin. Parasitologists studying this concluded that, "A few amino acid changes in the sequence of any of the subunits may alter the ivermectin sensitivity of the channel significantly." (see link)
Since these types of changes historically appear to be the result of "random" mutations, there is no saying when or where such a mutation might occur. It may never happen, or it might take a long time... or it might not take long at all. The problem with taking any drug prophylactically or often, especially one with such a wide range of action on so many species, is that you are exposing a wide range of species (nearly everything in your body, as ivermectin even crosses the blood-brain barrier) to repeated doses of the drug, whether they are the target of your therapy or not. When any of them live through your dosing - which was perhaps an effective dose for the parasite you were targeting, but an ineffective dose for other parasites lurking in your tissues - you run the risk of those survivors going on to produce an entire line of survivors, aka a resistant line, without ever being aware that's what's happening, until you or someone else develops a clinically relevant population of that organism.
Here is an excellent review paper by Martin, Robertson and Choudhary about ivermectin, its actions and areas of resistance, from which I've drawn the data, conclusions and quotes noted above:
https://www.cell.com/trends/parasit...m/retrieve/pii/S1471492220302907?showall=true
As far as saftey, I agree that it is very safe; therapeutic doses run the range of 150 to 200 μg/kg to ruminants, pigs, horses, or humans. Contrast that with the doses necessary to induce toxicity in monkeys (24 000 μg/kg) and in beagles (80 000 μg/kg).
There is interesting and reassuring information about human toxicity from
INCHEM.org, (WHO’s website for “Internationally Peer Reviewed Chemical Safety Information”)-
INCHEM.org Section 7.2.1 Human Data.
According to that publication, the margin of error for invermectin overdose reported in mammals is quite large, even in collies, which are known to be sensitive:
Section 7.2.2 Collie dogs have been shown to be more sensitive than other dogs to the toxic effects of ivermectin. Depression, tremors, mydriasis, ataxia, coma and death have been seen in Collie dogs at 100 ðg/kg orally and greater, but not at the recommended dose of the commercial product (6 ðg/kg) (Campbell & Benz, 1984).
(Another collie study of injectable ivermectin found that they can suffer from normal therapeutic doses of 200-250 microg/kg given via injection, see
Ivermectin toxicity in 17 collies - PubMed.)