Exporting to gLTF gives me a wrong orientation in Three.js

I have an animation in FBX format that I want to export with Blender to gLTF to be used on a model in Three.js (FBX format, which is the original, gives me other problems…). But, when I do it, the animation is played in the wrong orientation, no matter if I rotate it, it’s always played like this:

It probably is because the option “Transform: +Y Up” is marked in Blender export. But, when I unmark it, the result is weird. It seems that the animation is no longer synchronized with the model skeleton:

What’s the problem? And where is the solution, In Blender or Three.js?

If the glTF assets are rendered the same way in other engines, it’s probably not an issue in three.js. E.g. you can drag’n’drop on of your assets into the BabylonJS sandbox and verify the animations: https://sandbox.babylonjs.com/

I see nothing when I open it there. Maybe because the animation is in a different file from the model: