Hello Joris,
your idea sounds cool, but my very personal opinion a Roundcube user (and I think also Aleksander is suggesting the same in between the lines) would be to implement a basic stand-alone JMAP server (handling only the Calendar/Contacts Stuff if it's the case you need to support) and then start implementing a JMAP client plugin in round cube that's referring to the JMAP server you're building.
I see the advantage of recycling Roundcube's tables for contacts but you're basically transforming a Client into a Server - RoundCube is just a WEB "version" of lttrs...
If you'd move in this direction count me as beta tester :-)
Andrea Brancatelli