But an infinitely large punishment for selling and gaining a finite good means that you are infinitely badly off.
Only if you take the option of selling it? Keep in mind the original conclusion we're going for- "a punishment that completely prevents me from selling my trumpet hijacks my revealed preference for keeping my trumpet, setting it at infinity."
(For the story's example, the punishments are finite- the prisoners could sneak in unhealthy foods or avoid exercise- and so we're just interested in the weaker statement that the punishment dramatically increases the prisoner's revealed preferences for eating healthily and exercising.)
But surely one's revealed preference for the trumpet wouldn't be infinity, say, but some small number like a million? So the infinity is excessive.
Available in PDF here, the short story in question may appeal to LW readers for its approach of viewing more things than are customary in handy economic terms, and is a fine piece of fiction to boot. The moneychanger protagonist gets out of several sticky situations by making desperate efforts, deploying the concepts of markets, revealed preferences, and wealth generation as he goes.