I don't have experience with having to replace a Switch or all of the matters surrounding that. However, I recall it being said back in the day that unlike 3DS cartridges where game saves are tied to the cartridge, Switch games save to the Switch internal memory and/or the Switch's SD card. The matter came up on the forums when people found out that we could only have one New Horizons island per Switch, whereas you could have multiple New Leaf towns on the 3DS so long as you had multiple copies of the game.
I don't know what all steps you'd need to take with getting the account stuff figured out, moving the SD card to a new Switch, etc. but I would figure Corrie is correct that it would just be tied to your account. You might need to redownload the DLC on the new system but probably shouldn't need to repurchase.