I have always heard the term used in referring to a single word. When browsing questions on this site, I've seen it used applied to entire phrases, and have suppressed the compulsion to edit them and replace the term with origin.
the history of a linguistic form (as a word) shown by tracing its development since its earliest recorded occurrence in the language where it is found, by tracing its transmission from one language to another, by analyzing it into its component parts, by identifying its cognates in other languages, or by tracing it and its cognates to a common ancestral form in an ancestral language [emphasis mine]
The key phrase there is "linguistic form". Words and morphemes are linguistic forms, but so are sentences and phrases. Sentences and complex phrases are not fixed enough to be really studied in an etymological sense, but common phrases, idioms, and other fixed forms are, so I see no problem with applying the term "etymology" to those things. Furthermore, the boundaries between affix, clitic, word, and phrase are very murky, and I don't see any reasonable criterion for allowing the first three to have etymologies, but not the fourth.
Here are my two coins:
I looked up the dictionary, and etymology is defined thus:
— n , pl -gies
1. the study of the sources and development of words and morphemes
2. an account of the source and development of a word or morpheme
So, etymology is used on individual words, roots, prefixes, suffixes, affixes, etc. But not on phrases, idioms, or expressions.
For phrases, idioms, or expressions, I would use:
To sum up, for me, etymology is only used for individual words and morphemes, while origin is used for phrases, idioms, and expressions.
The word parsing it's more suitable.
American Heritage® Dictionary of the English Language, Fifth Edition: parse (pärs) v. parsed, pars·ing, pars·es v.tr. 1. a. To break (a sentence) down into its component parts of speech with an explanation of the form, function, and syntactical relationship of each part. b. To describe (a word) by stating its part of speech, form, and syntactical relationships in a sentence. c. To process (linguistic data such as speech or written language) in real time as it is being spoken or read, in order to determine its linguistic structure and meaning.