You need to take control. Has he been to the vet to rule out any medical problems?

If he pooped in the crate, it is too large. A dog will not normally defecate where it sleeps.

You need, as I said, to take responsibility. Retrain him like you would a puppy. Take him out after he eats, go for a walk or something if you are bored, but do not go back inside until he has done his business. When he does, praise him outlandishly.

Keep watch on him at all times. If he looks like he's about to go, immediately pick him up and bring him outside.

Does he get taken out right before you go to bed? Do that, do not go back inside until he has done his business, then no more treats or food until morning.

Control his food and treats carefully. Make strict routines of when he goes outside, and stick to them.