Rather than a powering a DC motor to apply torque against the shaft's running direction, you could consider a DC motor, physically driven by the shaft, to be a generator, creating an EMF proportional to the shaft's angular velocity.
If you do nothing with that EMF, not using it it to push current through anything, to "do work", then the motor offers no resistance to the shaft's rotation (other than its own friction), there's no opposing torque, no energy is removed from the shaft.
But, you can do work with that EMF, which will result in torque that the shaft must overcome, and any work it does in doing so is ultimately work done by the shaft's own source of energy. This is a simple consequence of conservation of energy. If the shaft experiences a torque opposing its rotation, then the work done by the shaft each second (joules per second, which is power, in watts) is the product of that torque \$\tau\$ (Nm) and the angular velocity \$\alpha\$ (radians/s):
$$ P = \tau \alpha $$
In other words, the power in watts that the shaft is delivering to a physical load of a certain torque is calculable.
Now let's say you connect a motor to the shaft, and the shaft has angular velocity \$\alpha\$. If the motor generates a potential difference of 10V when a resistive load \$R\$ is connected across it, then the power delivered electrically to that load is:
$$ P = \frac{V^2}{R} $$
If that motor were 100% efficient, with no friction, no eddy currents or winding resistance, then by conservation of energy you could equate the power delivered electrically to the load, and the power delivered mechanically by the shaft:
$$ \frac{V^2}{R} = \tau \alpha $$
It's obviously not going to be 100% efficient, and some energy will be dissipated as heat in the resistance of the motor's windings, some will be lost in overcoming friction, and so on. But you could conduct experiments to measure the efficiency of the motor at certain angular velocities, currents and voltages to obtain a figure for efficiency \$K\$, and modify the equation to be:
$$ \frac{V^2}{R} = K\tau \alpha $$
None of this requires any active circuitry, or even a power supply, just a motor and a resistor, and equipment to measure motor current and voltage. Ultimately, by choosing \$R\$, you can control torque.
However, \$R\$ is getting hot from all the \$\frac{V^2}{R}\$ power it's receiving, so you may need to take measures to cool it. The motor's winding resistance will be dissipating power too, make sure it's able to handle the currents that it's pushing through \$R\$.