How do I stop my friends' garbage residents moving to my island?

If you have an open plot, I believe the game tries to fill it, preferring move-outs from friends.

The only way I know of to stop this from your end is to invite a villager yourself to fill the plot, either from visting islands, amiibo cards, or another leaving villager from another player.

Your friend can also stop this by finding another person that wants their villager. Some services such as Nookazon exist to faciliate this.