Hopefully vigor can be restored, impossible to say for sure. I put all of my plants in cactus/palm soil, instead of potting soil. What you describe could be an issue with the roots rotting, from not having oxygen in the soil while it is moist. The much smaller particles of potting soil have much less space between them, so there's less space for oxygen to be in the soil. Adding a lot of perlite to potting soil is another method that has a lot of devotees, I just happen to have a strong aversion to perlite.
Whatever "stuff" you choose to put in the pot, leave it fluffy, don't pack tightly.
You may find a pancake of roots at the bottom of the pot. Chopping that off will help the roots to be able to grow normally again, and make removal of the old soil so much easier. Remove any mushy roots if you find them, replant so that the soil is at the same level (where the trunk/roots submerge) as it was before. If the new soil is moist at all, not necessary to water right away, and a chance to completely dry in the new soil should have a healing effect on the roots, if they had some rottong but are still salvageable.
The first few times you water a newly repotted plant, try to apply a gentle sprinkle, so the force of gushing water doesn't compact the soil & eliminate those tiny air spaces that help roots breath & soil to evaporate to dry in a timely manner.