Unfortunately, the closed-off nature of iOS means you can't simply install a third-party keyboard that works the way you want in every app. What you can do is tweak Apple's to prevent it from being so frustrating.
All you have to do is dig a bit into the settings menu:
From Settings, head to the General menu.
Once there, head to the keyboard menu.
If you scroll down, there's an option called "Add New Shortcut...". Tap it.
There are two boxes in this menu. In the Phrase box, put a word or phrase that you use commonly, but your iPhone still thinks to autocorrect away from. In the Shortcut box, you enter a short combination of letters that your iPhone will recognize and replace with your phrase in texts.
Here's what it looks like when you use a shortcut when composing a message. With only a minute or two of adding shortcuts, you can greatly reduce the amount of time spent writing common phrases — or re-writing those expletives we all use more than we care to admit.