If you talk to them regularly and hunt down that move ping you'll always get it. There are certain ways you can tell if someone is moving because villagers will talk about other rumors and stuff if no one is moving, but if you pick a couple villagers to spam talk to every few days at some point villagers will mention if someone is planning on moving. But it is possible to miss the ping and have them randomly in boxes one day. You just have to be cautious. I made a
guide on how to prevent that though.