What to do with a village too close to my Iron Farm?

Solution 1:

As far as I know, the reason that you can't have a village too close to an iron farm is because villagers will only spawn an iron golem if they haven't seen another iron golem recently. Villiger spawn iron golems periodically, so having a village near an iron farm means there is a risk that an iron golem from the village will wonder too close to the farm and prevent more iron golems from spawning.

Villagers also won't spawn an iron golem if they haven't slept recently. (I'm not sure if this is true for villagers running away from mobs, as their behaviour changes to make it easier for them to spawn iron golems. This is why the iron farm works.)

Because of this, I'd imagine that destroying most of the beds would be enough, however you could kill most of the villagers as well if you want to be safe.

See https://minecraft.fandom.com/wiki/Villager#Iron_golem_summoning

I think it should be ok to leave up to two villagers. (or 4 if you are sure that aggressive mobs will not be able to go near them)

I'm sorry that I've not been able to provide a concrete answer, however I hope my information is somewhat helpful.