I just want to add some words of moderation here. 3-1/2 can be a really really tough age - they talk about the "terrible twos", but 3-1/2 was way, way WAY harder for my son. There's a lot of internal conflict for them at this age, they feel really pulled between their desire for independence and their desire to be taken care of - perhaps especially with a (still relatively new) baby sister who gets taken care of *all the time.* It is completely developmentally appropriate for him to be struggling with control issues - which can mean defiant behavior, but the whole potty process is really their first experiment in self-control, so it's not at all surprising to me that he's acting out through potty behaviour.
Now, it's also totally NOT OK for him to pee or poop anywhere but IN the potty, but be a little gentle on the correction, here. It was very hard for me, but I found I got much better (and faster) responses from my son when I responded to his "control experiements" with firm compassion rather than punishment. You really don't want to set yourself up for ongoing potty battles, here. I personally would not feel good about making a 3-1/2 year old clean up their own poop - they just don't have enough coordination or awareness to do a good job or to keep themselves clean - you hardly need nasty gastrointestinal infections on top of everything else. Pee, totally fine - but also, not as a punishment - just, "oh, well, you made a mess, you are a big boy, so you can help clean it up." But don't leave him alone with it, and don't shame him about it - that can lead to all sorts of potty training problems. Honestly, it's pretty amazing that a 3-1/2 year old is well-enough potty trained to go without any assistance - let alone poop and wipe without any assistance! Some kids (especially boys) are just getting the hang of peeing in the potty at his age!
I know it's hard, and baffling, and frustrating - and you do need to set up some clear boundaries for him, not just about the potty. But this is a really important struggle for them, it's their first independence crisis, in a way, and they're going to keep coming back to this over and over again for the next 20 years. Think about teenagers struggling between independence and being taken care of - it's the same conflict, just on a different scale. Start to think about ways in which you CAN give him more control in his life. Whenever you CAN give him a choice about something, let him choose (even if it's just, "do you want peanut butter or tuna for lunch?" or "do you want to wear the green or purple pajamas?" And whenever you CAN skip the battle, SKIP IT (If he's playing something annoying but not physically dangerous or disturbing to his sister, let it go sometimes.)
So take a deep breath, know that your child is not the first (or the last) to poop in inappropriate places, set some clear boundaries about appropriate behaviour, and try to make some more room for him to have control over age-appropriate things (what he wears, what he eats, which park he goes to, which game he plays next, which friends he plays with.) Staying firm about the things that were NOT in his control, but making extra room for him to start to have control over other things really worked for my son. It was a tough 4-5 months, but he really seems to be coming out of it now, and with a whole other set of independence skills!
Good luck!