I would prefer to swap hardware first. Install R81.20 on the new box, downgrade in-place to R80.40, config_system, then import. That will get you on the fixed partition scheme earlier, so the import and the later upgrade should be faster. This depends on the new box actually supporting stock R80.40, though.
If the new box needs a custom R80.40 image, I would prefer the upgrade-in-place first, then moving to the new box. The old box would have the misaligned partition table, but the new box wouldn't.