View attachment 46234
try this. It may not be exactly what your looking for, but if you've got your wisps harvesting from haunted gold mines already, then this should do for getting rid of them after they construct ancients.
The condition is a Boolean Comparison
note that the wisps will still be counted for your food costs until construction is done.