The primary issue with motor swapping is the motor worm. If they are different you can remove and swap them but its not easy as they are an interference fit. You would have to make a special jig to avoid bending the motor shaft to install the gear.
The flywheel is less of an issue unless clearance is close. Early Williams used smaller diameter but thicker flywheels. Later ones had thinner but larger diameter flywheels.
Pete