Likely derived from verb 飽きる・厭きる・倦きる(akiru), older form 飽く・厭く・倦く(aku, “to be full up; to be fully done; to tire of something, to have too much of something”).[1]
First cited to the 古今和歌集(Kokin Wakashū) of the early 900s,[2] where the term is used as a pun for the verb.[1]
The senses related to flavor and harshness arose from the practice of using lye in food processing to remove unpleasant flavors.[1]
The kanji spelling 灰汁 is an example of jukujikun, using the characters for 灰(“ash”) and 汁(“broth”) in reference to the practice of leaching wood ash in water to derive lye.