Ok looked at your file. Couple of things I tried to take pictures of all. Your ameshhad negative rotation applied. Eventough it was at 0 it was in fact -0 which means that your animations tried to flip itself on export. Below is to fix it.
- First your scene needs to be set to metric and unit scale to 0.01.(this will shrink your current model to like 1cm in height select both you mesh & armature and scale it by 100)
- Then you have to make sure your scaling and rotations are correct in your transform tab.(shortcut key is N)
- If there are random size then push CTRL-N while you have the mesh selected and apply rotation, then location and finally SCALE.
- Do the same for the Armature.
- Select both at the same time and EXPORT FBX. Tick SELECTED OBJECTS, Use EDGE or FACE smoothing under GEOMETRIES and under armature untick ADD LEAF BONE.
Import to Unreal and you can see below no more problem.
CHANGE YOUR SCENE SETTINGS
WRONG TRANSFORM SETTINGS
APPLY SCALE,ROTATION & LOCATION TO ARMATURE
APPLY SCALE,ROTATION & LOCATION TO MODEL/MESH
FINAL RESULT MOVING BONES IN UNREAL