Correct, the solution exists, and it is called Signal.
Signal is my main texting app these days. But interoperability is its Achilles' heel. Moxie and co. need to stabilize the feature set and make it an open protocol asap.
It used to be open to servers operated by other parties, and Cyanogenmod ran one, but I’m not sure anyone used it. Moxie has since written that they’re not ever going to do that again because they want to move too fast, to be able to compete with the commercial players.