The lever in the essay is not how this started.
Philippa Foot, "The Problem of Abortion and the Doctrine of the Double Effect," Oxford Review no. 5 (1967), reprinted in Virtues and Vices (1978). She is not asking a bystander what to do with unlabeled bodies. She is asking why we treat two five-for-one swaps differently.
First swap: "the driver of a runaway tram which he can only steer from one narrow track on to another; five men are working on one track and one man on the other; anyone on the track he enters is bound to be killed." She says we should say, without hesitation, that the driver should steer for the less occupied track.
Second swap: a judge facing rioters who will kill five hostages unless a culprit is produced. The real culprit unknown, "the judge sees himself as able to prevent the bloodshed only by framing some innocent person and having him executed."
Same arithmetic. She first tries the doctrine of double effect: you may bring about by "oblique intention" what you may not aim at as a means. She then prefers a different cut. A duty not to kill outweighs a duty to save. The tram driver is choosing which killing-duty to violate. The judge is killing one in order to save five.
The workmen have no ages. She still thinks the driver should steer.
Judith Jarvis Thomson gave it the name and moved the agent.
"Killing, Letting Die, and the Trolley Problem," The Monist 59(2) (April 1976): 204–217. Then "The Trolley Problem," Yale Law Journal 94(6) (May 1985): 1395–1415. She puts a bystander at the switch after the driver faints. Most people still say turn. That wrecks Foot's "the driver is already killing" story, because the bystander who does nothing kills nobody. He lets five die.
She then adds Fat Man: you are on a footbridge; a large man is leaning on the rail; a shove would stop the trolley with his body. "Everybody to whom I have put this case says it would not be" permissible. And Transplant: a surgeon with five patients who need organs, and a healthy young man who says no. Same five-for-one. Nobody says cut.
Thomson's question, not the essay's: "Why is it that the trolley driver may turn his trolley, though the surgeon may not remove the young man's lungs, kidneys, and heart?" She is inclined to call the bystander version The Trolley Problem.
The essay's "don't use persons as objects" is her Fat Man / Transplant intuition. She also has a loop: the side track circles back, the one man is fat enough to stop the trolley, so you need his body as a stopper. She still thinks you may turn. Using-as-a-means, on her own test, does not track the shove.