also nerveracking, "causing anxiety or mental stress," 1812, from nerve (n.) + present participle of rack (v.1). Between nerve-racking and nerve-wracking (1867) this is probably the better choice as a figure of speech, but the sense of wrack (v.), though less suitable in the image, is not obviously wrong.
Proto-Indo-European root meaning "move in a straight line," with derivatives meaning "to direct in a straight line," thus "to lead, rule."
It forms all or part of: abrogate; address; adroit; Alaric; alert; anorectic; anorexia; arrogant; arrogate; bishopric; correct; corvee; derecho; derogate; derogatory; Dietrich; direct; dress; eldritch; erect; ergo; Eric; Frederick; Henry; incorrigible; interregnum; interrogate; maharajah; Maratha; prerogative; prorogue; rack (n.1) "frame with bars;" rail (n.1) "horizontal bar passing from one post or support to another;" Raj; rajah; rake (n.1) "toothed tool for drawing or scraping things together;" rake (n.2) "debauchee; idle, dissolute person;" rakish; rank (adj.) "corrupt, loathsome, foul;" real (n.) "small Spanish silver coin;" realm; reck; reckless; reckon; rectangle; rectify; rectilinear; rectitude; recto; recto-; rector; rectum; regal; regent; regicide; regime; regimen; regiment; region; regular; regulate; Regulus; Reich; reign; resurgent; rex; rich; right; Risorgimento; rogation; royal; rule; sord; source; subrogate; subrogation; surge; surrogate; viceroy.
It is the hypothetical source of/evidence for its existence is provided by:
Sanskrit raj- "a king, a leader," rjyati "he stretches himself," riag "torture" (by racking); Avestan razeyeiti "directs," raštva- "directed, arranged, straight;" Persian rahst "right, correct;" Latin regere "to rule, direct, lead, govern," rex (genitive regis) "king," rectus "right, correct;" Greek oregein "to reach, extend;" Old Irish ri, Gaelic righ "a king," Gaulish -rix "a king" (in personal names, such as Vircingetorix), Old Irish rigim "to stretch out;" Gothic reiks "a leader," raihts "straight, right;" Lithuanian raižytis "to stretch oneself;" Old English rice "kingdom," -ric "king," rice "rich, powerful," riht "correct;" Gothic raihts, Old High German recht, Old Swedish reht, Old Norse rettr "correct."
"loud, disorderly, confusing noise," 1560s, probably imitative. Klein and Century Dictionary compare Gaelic racaid "noise, disturbance," but OED says this "is no doubt from Eng."
Meaning "dishonest activity" (1785) is perhaps an extended sense, from the notion of "something going on" or "noise or disturbance made to distract a pick-pocket's victim." Or it might be from racquet, via the notion of "a game," or from or reinforced by rack-rent "extortionate rent." There also was a verb racket "carry on eager or energetic action" (1753), and the gangster sense might be via the notion of "exciting and unusual." Weakened sense of "way of life, one's line of business" is by 1891.
"box or trough in a stable or cow-shed from which horses and cattle eat food other than hay" (which generally is placed in a rack above the manger), early 14c., maunger, from Old French mangeoire "crib, manger," from mangier "to eat" (Modern French manger) "to eat," from Late Latin manducare "to chew, eat," from manducus "glutton," from Latin mandere "to chew" (see mandible). With Old French -oire, common suffix for implements and receptacles. In Middle English, to have at rack and manger was an image for "keep (a mistress, followers, etc.), supply with life's necessities."
1680s, "large box of wood, slats, etc., used for packing and transporting," earlier "hurdle, grillwork" (late 14c.), from Latin cratis "wickerwork, lattice, kitchen-rack," or from Dutch krat "basket;" both perhaps from a common PIE root *kert- "to turn, entwine" (see hurdle (n.)).
"to torture, torment, inflict very severe pain on," as if by crucifying, 1560s, from Latin excruciatus, past participle of excruciare "to torture, torment, rack, plague;" figuratively "to afflict, harass, vex, torment," from ex "out, out from; thoroughly" (see ex-) + cruciare "cause pain or anguish to," literally "crucify," from crux (genitive crucis) "a cross" (see crux).
"small wheel with teeth to gear with a larger one" (as in rack and pinion), 1650s, from French pignon "pinion" (16c.), literally "a gable," from Old French pignon "pointed gable, summit," from Vulgar Latin *pinnionem, augmentative of Latin pinna "battlement, pinnacle" (see pin (n.)). Pinoun as "a gable" was borrowed from Old French in Middle English (late 13c.).