For some reason - my mind has a simplified scenario - but I am in no way an expert, nor have as much experience as you do, but this is what I see.
Setting up the webhooks was fairly simple. Install xmppwb using python, create a configuration file with certain variables, then run xmppwb.
Create a page that will receive the information from the webhook. Now, for those who do not know what a webhook is - from my understanding, the way it works is as such: when a user posts a message in the chat, a function is ran that sends this information to any page you want to and from there you can do whatever you want with the data. Most prime example of the functionality of a webhook - your log files. An "Event" - such as an error - triggers the function that then writes the information to a log file.
So, with that being said. I have already installed the xmppwb and have a page that accepts the data and then enters into a text document. Next would be to create a page that would retrieves the webhook data, post to send to database, then refresh the page - or dynamically refresh with ajax and store info in an xml file.
And on the other side - create a field that allows the user to input a message - which is then entered into the chat using curl. This - in theory - would also trigger the webhook to kick in and display the new message.
Forgive me if my thoughts seem elementary and I am missing a bunch. I am really liking this Rocket.Chat and the expansion capabilities seem endless. I just really want it to work.