Best way to synchronise a weapon and a player animation?

My character is set up as above.
The weapon instance is attached as a child of the skeletal mesh, under a hand socket to automatically position the weapon in the right place.

The character has animations set up properly using the pose caches and state machines, to correctly animate the right parts of the skeleton. This includes animations for pulling a trigger and racking the weapon’s slide.
The weapon itself also has the corresponding animations where necessary, such as for the slide and trigger movement.

If the animations were the same length for both actors, I could probably just use a near-identical state machine setup to achieve a result, but that’s far too rudimentary and restrictive, and requires changing animation length unnecessarily.

I need to synchronise the two actors such that when the player’s animation state machine triggers the player’s firing animation, it also triggers the weapon’s firing animation.
So far, I have found that functions may not be called from animation states, and that attempting to use animation notifies on the beginnings of all relevant player animations to trigger the weapon’s animations is nowhere near reliable.

What’s the best way to synchronise the animations of an actor and its parent actor?

You can try to Play an Animation Montage instead of the state machine. Use the states for the normal Animation like Walking, jumping etc. Then if you want to fire or reload call Play Animation Montage. It should work. I do it so in my game.