there are Java, Javascript and Swift libraries for XMPP
> I don't have 10 engineers. It's already super complex
The point is XMPP is a solved problem, you can simply use what you need of it, making it json over websocket won't make it anyway easier, you would use a library anyway
Creating protocols just for the sake of it, it's the reason why this comic exists https://xkcd.com/927/
p.s.: Movim, afaik, solves that problem for you
When you use Movim, it acts as an intermediary between the user's browser and an XMPP server. All the data that is sent and received by these two parties are managed by the Movim core, some of them are also saved in a database (for cache purposes).
From the browser perspective, all communication with Movim is done using WebSockets (except for the "default" page loading). These sockets are proxied through your web-server to the Movim daemon. On the XMPP side Movim connects using pure TCP connections (like any XMPP client).