This adds two new rotation modes to Objects and PoseBones ('QUATERNION_SLERP' and 'QUATERNION_SQUAD'). Also provides a potential solution for T45473
Objects and PoseChannels maintain a cache of 4 interpolation quaternions during animation playback, providing enough context to turn fcurve time-instances into quaternion interpolation knots.
Additionally, a bpy.ops.graph.sample_quaternions operator is available to 'export' the computed quaternion keyframes into their source fcurves.
Comparison video, demonstrating dynamic long-case correction: