From what I see in my textbook and several on line resources (such as this, p. 8-8), I am tempted to think that the magnetic force $I\boldsymbol{\ell}\times\mathbf{B}$ acting on a straight conducting wire, flown through by a current whose intensity is $I$, placed in a uniform magnetic field $\mathbf{B}$, is such that the magnetic moment due to it, which I think we can write as $$\boldsymbol{\tau}= \int_0^L \mathbf{x}(t) \times \bigg( \frac{I}{L} \boldsymbol{\ell}\times \mathbf{B}\bigg) dt $$where $L$ is the length of the wire and $\mathbf{x}:[0,L]\to\mathbb{R}^3$ a parametrisation of the wire with respect to the point chosen as the pole of the torque, can be calculated as if the force were all concentred in the midpoint of the wire $\mathbf{x}(L/2)$.
Is that so? If my idea is correct, how can we prove that the torque is the same that we would have if the resultant force were all applied in the midpoint of the wire, i.e. that $ \int_0^L \mathbf{x}(t) \times \left( \frac{I}{L} \boldsymbol{\ell}\times \mathbf{B}\right) dt $ $=\mathbf{x}\left(\frac{L}{2}\right)\times(I\boldsymbol{\ell}\times\mathbf{B})$? I heartily thank any answerer!