I've opted to use the Understrap theme as a base theme for development.
How do I safely change the theme slug throughout the theme files, i.e. everywhere
Is it simply a case of performing a search and replace?
For a theme name
Hello World a search and replace should be done in phases.
These steps will ensure that there is no unintended replacement which may break the theme.
Yes, a search and replace could work. Make a backup, do it and see what happens.
Depending on the theme and your adaptations, there may be some snags, however. For instance, the theme may sometimes derive the slug from the Name in
style.css. If you change it in one place, but in another it uses the Name and there is a difference, things may not work. There may be a relation with the text domain or with actual file names which do not change with a search and replace.
So, once again, yes, search and replace could work. But there are all kinds of exceptions thinkable, which would lead to errors.