Found the issue after watching an ELI5 video on gimbal lock (titled “Euler (gimbal lock) Explained”)
The video’s recommendation of choosing the rotation hierarchy least likely to enter gimbal lock made me check the rotate order set in the Geo Comp. By changing it, I found an order that works without problems for my case. So I guess, I both framed my problem wrongly, and did not understand the math.
Thanks to Malcolm and GuerillaCG!
Solved!