When it comes to foul language in the household, my wife and I are raising our kids the same way myself and my brothers were raised. Cussing was always allowed in our household as long as it wasn't used in a defiant way towards adults. I was also raised to not use it in public settings liberally like I would at home. My wife and I agreed on this for two main reasons.
First is that we are FIRM believers in words themselves aren't the issue, but rather the context in how they are used is what matters. Say for instance if my oldest son has to go to the bathroom and says "hey I have to shit". That to me would have the same meaning if he substituted poop for shit. Now if he insulted another kid by telling him he looks like shit, then that would be the same if he said poop instead of shit. I know it's a little odd of a method to believe in, but it really does work when you don't pay attention to the words as much as you do the context.
Second of all, we don't believe in forcing our kids to live a sheltered life. It's pretty foolish to think that by the time your kid starts school, they have never heard a cuss word in their lives. By educating kids early on what cuss words mean and why they're used, there won't be any confusion later on in life.
Now as for using cuss words accidentally around your kids, I guess it all matters if it's a word your kid has never heard before. In my case I have accidentally used the C word around them, but luckily they didn't seem to acknowledge that as a cuss word because they have never repeated it. Words like that would be difficult to explain because they are a less common cuss word than hell or shit or damn.