He sounds a bit scared if he is pooping being handled. I can't remember what the story was before, but sometimes you need to take taming and handling slowly. I did a little video on taming our hamster if it helps. Rubbing himself in substrate sounds a fairly normal thing
https://www.youtube.com/watch?v=kjyEme2xcq4