Baking objects with consitent ID or names

the rhinocommon
replace
method should keep the ID.
(do it via scripting component in Rhino 7)

or use rhino 8

not sure about posted plug-ins