A.J.
The problem with "explaining the words he should use instead" type theories, is that they assume the source of the swearing is not knowing what he should say instead. hello. He knows what he "should" say, he wants to swear and there is no effective deterrent. Time outs for 4 year old boys rarely matter. I mean I get it, they're a "school" so they can't REALLY discipline him, nor should they have to.
I think your gut is correct. You haven't been strict enough. Be firm, and double up the consequences until it's worth it to him to control his language. This won't get easier at five or six, so clamp down now! This book is great for boys this age, Back to Basics Discipline by Janet Campbell Matson.
My son is four, and if I heard he was swearing at school, the first time, he'd get a warning and I'd letting him know I would check with the teacher every day to make sure he was talking nicely. Anymore swearing and he'd have a good spanking when he got home. If that didn't work, the next time it would be good spanking plus time out in his room with NO TOYS. Next time, those two things PLUS favorite toy or activity removed..etc adding onto that as it went. But my son does NOT swear because this happened one or two times when he was three, and he knows the results would never be different. He is capable of a really venomous, "DANG IT!" though.
He hears swearing all the time. So did I as a kid. It has no bearing on what he's allowed to say as a child. Will he swear when he's older out of ear shot of adults? Who doesn't?! At least he'll KNOW it's not nice and he'll have impulse control not to do it in public and around people who would be offended. I cant' STAND the little kids running around swearing today. Yuck. My friends and I were way too scared of our parents to pull that nonsense. Good work taking this seriously.