Ok, to not be reusable makes it a bit harder. I also cannot use the FreeCAD APIs, as the rebuild happens in a different FreeCAD instance, connected over network.
It's clear that coping and making all links/references work is difficult, I fully agree. Hence I have gone the way to keep all references valid by recreating the referenced objects. E.g. FreeCAD (at least 0.18) stores all links by name in the xmls. So when you access a object with the "Content" attribute you see all references by name. That object can than easily be restored in a new instance and everything works perfectly as long as the linked object with given name exists. Now with the ID this is not possible anymore, if they are used to reference objects anywhere. Hence it is absolutely required to find all objects with references that use the ID, and change them to the ID of the object you want. This is IMHO impossible, as ID is exposed to python and could be used in whatever fancy way the workbench creators can imagine. Just think about storing a ID in a PropertyInt,
IMHO it makes sense to allow the user full control over Object identity, as it was with 0.18. A possible option would be the exposing to addObject and failing if such a object already exists or was used before.