I have done a similar thing ie:- changed a 2ph motor for a 5ph motor.

Motor needs to be accurately centered, are the spigot dia's the same, are the shaft dia's the same. I did enlarge the bore of a wave generator, needs to be accurately centered and absolutely free of swarf, dirt.

The wave generator is usually only held on with grub screw, before you remove it measure the distance from the flange of the motor and make a note of it, this controls the depth of engagement into the flexspline.

When reassembling it is very easy to engage the generator one tooth out (eccentrically) because of the very fine pitch, make sure it turns nice and freely before tightening the bolts.