I don't know that I would use profanity in a book that's for younger audiences. I think books that are geared towards younger audiences, especially little kids, shouldn't have any profanity at all.
Now, when it comes it adult stuff, I can handle a cuss word once in a while. But if every other couple of words is going to be a cuss word, then I feel that it takes away from the story at hand if there's too much profanity.
When I am asked this, I always think of that old joke, "Don't use the lord's name in vain? I didn't, I got a lot out of it!" The word isn't bumblebees and flowers, it's a word full of cuss words, and those cuss words hold power, however, like with anything, overuse can lead to diminishing returns.
I would say it depends on what type of book. For kids, don't have any profanity. Yes, they already know a lot of those words lol but they don't need to read about them. Books for adults, a few swear words is okay. Even helps with the story. I just don't care for "swearing like a sailor".
I think profanity is not good for a young kid's book because many kids may not know the meaning for many profanity words, but I don't mind profanity words in teen and adult books.
I feel authors who use many lesser known profanity words could make reading a story less enjoyable because the reader may end up having to use the internet a lot to search up the meaning of less popular profanity words which are not found in a dictionary.