historically I think treadmills took the form of wheels
Some (IRL) are like conveyor-belts, except with power-takeoff instead of power into them. That's the kind often used for simple beast-power, with an easy low-profile construction. They're set at a low angle so that the weight of the creature as it treads forwards is just about as much as is needed to move the belt (with slats across it, suitable for hooved animals to have grip from) back at a speed comfortable for the creature(s) powering it.
Ones often used for punishment/rectification at prisons and workhouses are like a long horizontal barrel, often termed "treadwheels", and those 'working' upon them, often multiple abreast (which acted to make the punishment equal amongst all those upon it, except of course for those of shorter legs or ability to stride/step) and often had bars to hold to the front or sides of each person. (Whether the power went to something useful, or just went through a wall into some otherwise useless machinery of adjustable 'resistance' that would waste the energy suitably, would depend on the workhouse/prison ethic. Possibly also whether the Industrial Revolution had happened yet, in whatever historical period the wheel was built.)
But the type I'm imagining the DF Treadmill to be is more like the Treadmill Crane. From C12th, perhaps C13th, but certainly around for most of the largest cathedral buildings, it's a large waterwheel-sized device, but to be trod from the inside. Getting in and out would mean it would have to be stationary (or some pretty neat dodging of the spokes, if it was being used slowly enough), but could be single or multi-man. Or creature. I think there was also some use of them in harbours, from my memories of Aarhus, or whichever other place in Denmark it was that had a reconstructed historic port when I was there nearly 30 years ago.
Hence why I think it ought to be like a Waterwheel. But if Toady brings in conveyor-belts, I could imagine the first type as well. The treadwheel version doesn't seem too practical, to me. (Although there were treadwheel/mills in prisons and workhouses that looked like a steeper version of the farm-animal treadmill-belt. Or like those new-fangled "climbing walls" which roll around and tilt and go at different speeds for a configurable (and competitive, if being used side-by-side with someone else, each trying to keep the correct pace) climbing experience.
As to slavery, I agree, but it's an option. At least non-dwarves (goblins, especially) might be expected to use them, should they want power (or just feel like keeping their prisoners occupied).