As far as I can tell, you can have as many Home Assistant (websocket) servers as you like.
Node-RED is very good and shows the count of connected nodes using each server node, and clicking on the number brings up a list of every connected node, so relatively easy to pick them off one by one and move them to a different server.
As most imported code uses the same server name, telling them apart is difficult, so a good idea is to rename each server node you donāt want first, keeping the one you do as Home Assistant.
I have two active server configuration nodes as I have two machines running HA, so one server I have named as HA1 for the local connection, and the other HA2 as remotely connected. I can move any given HA node from one server to the other, and effectively this just makes the node work on the other HA instance. I would see no issues at all in moving nodes to different servers so as to reduce the count to zero before deleting. Another approach I have used is to set the spare server configuration node to ādisabledā, which highlights the specific connected nodes as they then error and stop working, and then I can go through my flows looking for these nodes and changing the server.
As always - take a backup copy of your flows before doing anything major or anything that you are unsure of first!
Multiple configuration nodes on the same HA might be useful, using different settings, but naming them differently is clearly helpful. I have also modified the Status date format - Separator to be [1] and [2], which means I can clearly see which server any HA node is using just by looking at the status line.
To avoid getting into this situation in the first place, exported code should ideally be scrubbed to remove the Home Assistant server and name. There is a facility to do this at
https://zachowj.github.io/node-red-contrib-home-assistant-websocket/scrubber/
Also, when importing other code, I try to inspect the node list (import will tell you what it is importing) and in the list I can unselect the Home Assistant server configuration node - this neatly prevents bringing in duplicate configuration nodes, forces all the associated HA nodes to flag an error (as they no longer have a sever node connected) and it is a simple case of opening to edit each node, which automatically selects the pre-existing Home Assistant server.
Hope this helps!