As long as you're sure there isn't a problem with going, I think you can assume it's the symptom of another issue.
My ds and two of the boys I did day care for did this. It was really frustrating at times. They were all trained, and then suddenly, months later, regression. It took me a while to figure out there was a bigger problem.
My suggestion is that your ds might be feeling out of control about something. When you figure out what that is and offer a solution to that problem, he should start pooping in the toilet.
My ds didn't like it that I was watching other kids 3-4 days a week, right when he was around 3. So he pooped in his pants, for about a month, on and off. There was nothing I could do, I needed to keep watching the other kids for money so we could eat, but I had lots of conversations with him.
Imagine, talking to a 2.5 year old about money and food, and all of that, but wonder of wonders, I managed to explain it to him where he understood that the kids were going to keep coming over, but it was okay if he didn't like it.
He spent a week telling the other kids, I don't want you here today, but at least he pooped in the toilet.
The other two boys didn't like it that they were away from their mom 3-4 days a week. So we talked about that, and they also went around for about a week saying that they didn't want to be away from their mom and didn't like it. But they started pooping in the toilet again as well.
Also, every time they pooped in the toilet, they got some kind of candy treat. I do resort to bribery and presents. Whatever works.
Another reason might be that they just don't want to take the time to go. They want to keep playing, keep having fun. The best way to deal with this is to remind them to go. And then, everytime they go in the bathroom, they get some kind of treat. Eventually, they'll remember.
The bathroom and the toilet are the only place I use bribes so shamelessly, but I don't care because it's better than cleaning up a mess and being
Hope that helps. I'm sorry you're going through this. I've been there. It's awful.