Migration within STM8 families is certainly possible if they are of the same groups that are: S, A or L
It is much more difficult (requires substantial redesign) between different groups.
STM has released some Application Note that help us to do this.
To find this AN, search on STM website the sentence:
Migrating from <STM8 family name>
Below there are some links, is not an exhaustive list, please search directly on STM website.