Twitch has added support for receiving chat message events over EventSub:
https://dev.twitch.tv/docs/eventsub/eventsub-subscription-types/#channelchatmessage
https://dev.twitch.tv/docs/eventsub/eventsub-reference/#channel-chat-message-event
recent-messages2 could support output messages in this format instead of raw IRC. An additional new optional query parameter would have to be added to switch to this json output method.