It might be better to make one space for the chickens, with a door that chickens can go through but the pig and goat cannot. That space could have roosts, nestboxes, and chicken feed/water. Then have another space for the goat and pig. The chickens will of course go in there too, and will poop...