(1) The cost of the rock drops precipitously with your ability to pay. No matter what value you compute for the rock, you will find that the actual cost of a rock never rises above "negligible" for anyone who isn't severely handicapped, regardless of ability to pay.
(2) If you anticipate needing a rock in the future, you probably don't have to dedicate any time to finding one. You can just pick one up whenever it happens to be convenient.
And that is even independent of torture being inherently immoral.
The _operational_ problem with torture is that the subject tends to tell you whatever unverifiable information they thing you want to hear. it is in this context that torture doesn't "work." the information is unreliable and thus low value.
For immediately verifiable information, such as a password, torture most assuredly does work and it is foolishness to pretend otherwise.