I think the export is trivial using the API. Import could get a little hairier if your new instance doesn't even know about some (or all) of the communities in your export. You'd have to script it to search for the community periodically until it finds it and then join once it does. And you might have to worry about edge cases like importing an old export with communities that may no longer exist.
I really like the idea, though!