Any way to reimport a skeleton with changes bone names?

On the skeleton I used, the bone names had the defaults. I’ve finally come around to changing the skeleton with proper naming for the bones, but reimport breaks everything.
The skeleton has a lot of animations etc.

I thought bone names were relatively superficial but apparently this is a huge pain?

How can I reimport my skeleton with changed bone naming properly? And keep all anims etc