Apparently I have been wrong all my life:
The American Heritage® Book of English Usage.
A Practical and Authoritative Guide to Contemporary English. 1996.
3. Word Choice: New Uses, Common Confusion, and Constraints
§ 251. rack / wrack
If you are racked with doubt about this pair, you are not alone. There are seven words spelled rack in English. Two of these are variants of words spelled wrack. The rack we are immediately concerned with is familiar as a frame for holding or displaying things: a hat rack. This rack also refers to an implement of torture, consisting of a frame on which the body is stretched. From this has come the figurative meaning “pain or torment.” In addition, rack can function as a verb, which means “to torture on a rack” and more commonly “to cause physical or mental suffering to,” as in For weeks after the accident he was racked with pain. It is the verb that gives us torment today. It often appears in the compound nerve-racking and in the idiom rack one’s brains. 1
On to wrack, of which, we noted, there are two. One means “destruction or ruin” and is familiar in the phrase wrack and ruin. The second wrack refers to wreckage cast ashore, but it is also a verb meaning “to cause the ruin of, wreck.” Thus a business can be wracked by stiff competition. Both of these wrack s have rack as an acceptable spelling variant, so a business can also be racked by competition, and the reader can never be sure if the business is in a state of metaphorical torment or if it is ruined—and in truth it may be both. 2
You can see how easy it is to mix these words up. If you want to avoid making a wreck of things, remember that the word rack, synonymous with pain, does not normally have wrack as a variant.