There is actually a much easier solution to fixing the camera-rotation problem than adding gimbals.
When changing the horizontal aim, simply add to the world rotation of the spring arm instead of the local rotation.
I just took a whole screenshot of your comment and put it in my secret knowledge archive folder password protected in a server in bahamas only accessible via 3000 VPN in series.
This was also the first thing I tried before watching Ben’s solution, but in fact I like the Gimbal-approach more because it better represents the architecture of the tank. The gimbal belongs to the turret and the spring arm to the barrel so that the “inheritance” of rotations is clearer.