Change joint rotation order and preserve animations?

Hi! I’m pretty new to rigging, so I made a newbie mistake of not checking the rotation order of joints in Maya before importing to UE.
I have a rig where two joints have the wrong rotation order/gimbal lock in Maya. Can I animate on a rig where the joints have a different rotation order, and still use them on the the old rig in UE without the animations breaking? (Or vice versa, using the animations of the old rig on the new rig). I’ve imported some test animations and everything seems to be working fine. But I wanna make sure I’m not breaking anything.