Actually, a gantry crane with a gimbal machine for the end-effector should work. https://app.adamcad.com/editor/2c8d19a6-5802-4376-ab95-7bcd34ed6bbd
So, a gantry crane has 3 actuators, one for each of the x-, y-, and z-coordinates of the end-effector (similar to some 3D printers or home CNC machines). One would then have the gimbal machine (similar to a multi-axis trainer) rotate to any direction in 3-space.
Per this post, this machine would have $$Q= [a_1, b_1] \times [a_2, b_2] \times [a_3, b_3] \times SO(3)$$ as its c-space, which strong deformation retracts onto $SO(3)$, and hence this c-space has the de Rham cohomology of $SO(3)$, which is a de Rham cohomology sphere. Thus, $H^{1}_{dR}(Q) = 0$, so any closed 1-form should have a potential function.
For any generalized force/torque 1-form $M$, by the above paragraph, if $M$ is closed, there is a potential function (0-form) $f$ with the property that $df = M$. By the Generalized Stokes's Theorem, we should then have $\displaystyle \int_{[C]} M = f(B) - f(A)$ (where $A$ and $B$ are the endpoints of the oriented curve $[C]$).
One could have $$M = 1dx_1 [N] + 1dx_2 [N] + 1dx_3 [N] + 2w_1dw_1 [Nm] - 2w_2dw_2 [Nm] + 2w_3dw_3 [Nm] - 2w_4dw_4 [Nm]$$ (where the units in brackets are the units of the formulas in front of the differentials [independent of the actual elementary formulas themselves; see, for instance, this post], where each $dx_i$ has units of m, and using the upper-half unit sphere quaternions, whose differentials are unitless, for the $SO(3)$ elements) and $[C]$ parametrized by $$\gamma: [0,1] \to[a_1, b_1] \times [a_2, b_2] \times [a_3, b_3] \times S^3$$ given by $$\gamma(t) = (t, t^2, t^3, \frac{\sqrt{2}}{2}t, \frac{\sqrt{2}}{2}\sqrt{1-t^2}, \frac{\sqrt{2}}{2}t, \frac{\sqrt{2}}{2}\sqrt{1-t^2})$$.
Then $$dM =0 + 0 + 0 + 2dw_1 \wedge dw_1 - 2dw_2 \wedge dw_2 + 2dw_3 \wedge dw_3 - 2dw_4 \wedge dw_4 = 0$$ so $M$ is closed. Hence, the 1-form would have a potential function, and a potential function would be $$f(x_1, x_2, x_3, w_1, w_2, w_3, w_4) = x_1 + x_2 + x_3 + w_1^2 - w_2^2 + w_3^2 - w_4^2$$ with $A = (0, 0, 0, 0, 0, \frac{\sqrt{2}}{2}, 0, \frac{\sqrt{2}}{2})$ and $B = (1, 1, 1, \frac{\sqrt{2}}{2}, 0, \frac{\sqrt{2}}{2}, 0)$. So, $$f(B) - f(A) = (1+1+1+\frac{1}{2}-0+\frac{1}{2}-0) - (0+0+0+0-\frac{1}{2}+0-\frac{1}{2}) = 5\ J$$ would be the value of the generalized work integral.
This Mathematica script computes the line integral both ways using the The Fundamental Theorem of Calculus for Line Integrals (FTC for LI) using the DifferentialForms.m package (The HomotopyOperator function is not functioning properly with this script for some reason, so I had to compute the antiderivative by hand).