J.F.
Maybe he's too young but maybe he is just having a hard time 'getting it out'. Talk to him about why he feels like he needs to poop next to the toilet. Maybe he is struggling to get the BM out sitting down at such an angle. That is something you can work on together and he will feel much better once you understand. Still, he may be afraid of the poop going in the toilet now for some reason and that is also something you can work on with him. I would keep making him clean up his mess but other than that I wouldn't punish him further because that may cause him to have a lot of anxiety over going to the bathroom. I'd visit your pediatrician if you can't make any progress over the next week or two. Good luck!