How can the internal SSD be cloned onto an external 1 TB SSD (for swapping)?
I am currently typing this from the system on the cloned 1 TB SSD, my solution was:


Clone internal 500 GB SSD with Carbon Copy Cloner 5 to the 1 TB SSD (using QNINE NVMe enclosure)
Swap 500 GB internal with 1 TB Sabrent Rocket NVMe
Directly boot into Recovery Mode
Added the missing VM container with the command: diskutil apfs addVolume disk1 APFS VM -role V I was not afraid of doing this because I found an Acronis script for cloning APFS volumes https://kb.acronis.com/content/60425 which executes the command pre restore. Interestingly the size of VM after the command was only some KB.
After booting Mojave the size of VM was 1.1 GB like before


Sadly we won't know if dd and afterwards diskutil repairDisk disk1 would also have worked.

Thanks and I hope this post will help people with a MacBook Pro up to mid 2015 to upgrade the internal storage. (After mid 2015 Apple started to solder the storage onto the mainboard).