There is quite a few ways you can do this.
But I would go with configuring the new switch as a stand-alone one, boot it up, let it upgrade.
Then you can connect the stacking cables and remove the redundant internet connection.
The dashboard will show you that you have switches that are physically stacked in the stacking section and you just apply that.
I don't think you will loose any configs, this never happened to me before - was your experience with Meraki switches?
If you come from classic Cisco stacks - bear in mind that the Merakis don't share one management IP, they will keep their separate ones.
Also, if they loose contact with the internet, the device will try to find its way across different vlans (I suppose they look what they see in the traffic) and set their IP via DHCP to regain dashboard connectivity.