With my machine empires, I try to have some planets that purposely have more housing than jobs when fully built up. If I happen to have a planet with too many free jobs available, causing the pops to keep switching around, I just stuff extra drones in there, it seems to help.