I never got an answer to this, but did it anyway.
I'm hoping that the Moodle core and plugins always refer to the roles' shortname, and never to the database ID of the original role.
Roles and permissions
deleting and replacing a default role
This discussion has been locked so you can no longer reply to it.