Ankle replacement surgery (History) is relatively new and for cases where there is a lot of damage which body will not recover from naturally.
I had ankle surgery in 90's by Mayo Clinic where a large cyst size of a golf ball which intertwined with ankle bones, tendons and blood vessels was removed. I asked about recovery and was told that due to amount of damage it was possible I would need further surgery or complete ankle replacement if it did not heal but it did with issues.
Ankle replacement surgery is very complicated and worse part it lasts ~10 years.