Crux means "a vital point or issue; the most important part of a problem or argument." It's derived from the Latin word crux, meaning "cross," which references the cross of Jesus Christ.
The prefix "ex-" in "excruciating" means "out of" or "from."
Therefore, "excruciating" literally means "out of the cross," or "out of a vital point of suffering." It is a metaphorical reference to the intense pain associated with crucifixion, which is why the word is used to describe extreme pain or discomfort.