Yes, that would be an approach. However, the full project contains another part, that of converting inbound XMPP messages to JSON messages (from/to/payload as parameters) and pushing them to a REST service.
Hence, either a complete external component app can be devised to cater both functionalities or one (inbound) will be implemented as an external component application and the other (outbound) through the REST API extension. However, the XMPP clients will recognise (an expect replies from) the firstname.lastname@example.org user. Can the REST API send outbound messages as an external component user or only as a direct attached-to-server XMPP user? This has to be investigated.. on the to-do list..