@EarMaster Someone else here on Fedi taught me a trick for that!
You create device groups and add the devices you want to them. Doesn't matter if it's only for one lightbulb, you create a group for it.
Then you build your automations targeting the group, and not the device(s) inside of it.
To help with clutter, you can even hide the individual devices from the UI.
Now, when you need to replace that device, you add the replacement to the group, remove the failed/old one, and it's done! No need to scour automations and scripts, or to redo your cards or dashboards!
I'll update the post in a few hours with the link to the person who taught me this, can't do it right now.
Edit: As promised, linking to @unixorn, who was the one that taught me this: https://hachyderm.io/@unixorn/115294312403405669