Daisy is like that to this day, after 4 years! We never hit her, and only yelled at her when she messed up. But her behavior was so consistent, we had no choice but to close her in a bathroom with the pee pad to do her stuff. That works. It's not convenient at all, but it does work for pee. It used to work for poop, also, but now she will pretty much only do that outside, which is not so bad unless its raining or 100 degrees out.
The conventional thinking that "his/her crate MUST be too large if they are pooping in it" was completely wrong in Daisy's case. It did not matter if we kept her in a big dog's crate or a smaller travel case. WHen we got home from work, she would always be smeared with crap (a terrible mess to have to clean after a hard day at work, we'd have to soak the bottom pan)!
More recently, we have left her in the bathroom (large with a gate so she can see out a window). We leave the radio on too. SHe has good days and bad days. Basically on the weekend she is fine, but on week days she can make an awful mess if she did not poop enough on her AM walk. We find she really needs 2 walks to get her business done in the AM.
One thing that helps is to LIMIT the food in the AM if you are going out. She then either makes no mess or more commonly a much smaller mess. One of the big problems is she does not seem to mind jumping up and down on her poop and making the mess 100X harder to clean up. If she'd just poop in the corner, let alone on the pee pad we always leave for her, it would be easy. But she is a VERY excitable girl, and often stomps in it. SHe does it right at the gate. Its as if she did not do it intentionally, but she gets too excited.
SO if you really need to, I'd recommend closing him in the bathroom and seeing if that works, but be warned you may be stuck with that inconvenient system for the rest of his life if he wont go outside.
Our other Yorkies had no issues at all with going either on the pee pads (by themselves) or outside, pee or poop, so we could let them roam the house while we were out without ever having an issue, but not spazzy ms Daisy.
Mr Gatsby even gets me and paws me until I get up and see the nice pee or poop he did in the middle of the pad, so he can have his cookie
Good Luck