Easy way to swap like device for like device?

is there an easy way to swap the same device for a replacement or does it have to be a new device and modify all the automations?

There is an easy way. Just use the same entity_id and you're good to go, meaning, you won't need to modify any automations or scripts.

With that said, do be mindful of device types. If you're swapping a lightbulb for a light switch, you'll want to create a "Change device type of a switch" helper so that it appears as a lightbulb.

This requires that you used entity_id in automations in the first place.
If you used device_id instead, then you need to update all the automations.
This is one of the reasons why you see peopl posting warnings on the forum against using device_id.

Indeed. You're effectively SOL if you use device_id's in your automations/scripts and thus, would need to update/modify them accordingly.