In the games they seem to be weapons who don't eat, so don't poo. But in the anime, they are seen eating so one can assume they take the time to defecate otherwise there would be several poo explosions inside pokeballs, which I'm sure would embarrass pokemon trainers.