Have you ever ran into the neferaus “shaking hinge” problem? Simply use two ball joints at different places, and the line between them forms the rotation axis of the hinge.
Example: Pivot 0,0,0 and pivot 0,0,1 would mean that the z-axis is the only free axis of rotation.
Use three ball joints in a triangle(roughly) to get a fixed constraint.
Only the “Pivot” matters, not the “Ax”.
Don’t worry, joints are cheap.