How to escape Gimbal lock?

Hi all, we are streaming data into UE4 as a matrix. The data comes in and looks as expected.

However we apply it to an actor though, we cannot seem to escape gimbal lock.

I rotate the object in Pitch, it rotates in Pitch.
I rotate the object 90 degrees in Yaw.
Now when i rotate in Pitch, it rotates in Roll.

How can we get around this? Have tried assigning as quaternions, as FRotator, splitting the rotate axes out to control the order, but nothing seems to fix it.

I saw an answer on answerhub about using the forward Vector as Yaw, but it was for a different problem. Could something like this be the answer?

Any help/ideas greatly appreciated!