Writing a messaging app is a fool's errand. You either build a chat app with someone elses money, invest in all chat apps (1/n) and hope you score a big one - e.g. like textbook publisher, or you wait and M&A the successful ones.
The barrier to entry to write a chat app is zero. Even if you are brilliant you will compete against hundreds other chat apps one of which will beat out with pure luck. Never compete against luck.