Combining two different skeletal animations with different rigs

Apologies in advance if this is off topic, but I’ve been wondering about this for a while. I’m also new to unreal (or any skeletal aspects of 3D game development).

Suppose you’ve been developing a game that uses a particular kind of skeletal rig (3 spine bones), but then you suddenly have to use skeletal animations which are slightly different (4 spine bones, or 2 spine bones, or even extra bones).

Are there any tools to merge those new bone types into your existing configuration? Or are all these handled magically somehow within unreal (or other game engines in general)?