You're right, ivermectin stays in the chickens system a long time, but it has been losing its effectiveness not only as a wormer in poultry, but also for treating mites. Of course, it's off label use for poultry as are many wormers.I recently read an egg withdrawal chart for all the various chemicals - it recommended 21 days for ivermectin.
I'm about to try the pour on drops for the first time as my chickens have some kind of parasite that the poultry dewormer didn't take care of and they seem to have lice too... I took in a few discarded chickens and learned the very hard way not to introduce other birds to my flock. There is a very rampant wild chicken population where I live and it's really hard to keep my flock healthy.
What poultry dewormer were you using? Lice can be best treated with permethrin powder or spray. Keep in mind that the inside of coops will need to be thoroughly cleaned out and dusted or sprayed as well.