If a big build and several builders get a porta loo!
Otherwise, assuming you still have access to more then one loo be very clear about which one they are allowed to use.
Make it a no go area for the rest of the family.
It’s quite rude to stink out your loo, but what can you do ? I agree you can’t exactly say don’t poo
Leave some air freshener and toilet cleaner in the loo to at least encourage them to leave it clean and better smelling.