What on earth does חס ושלום mean literally, or what is its etymology? Why do people use that phrase in particular to "ward off" bad things? (That last part of the question is not asking whether saying חס ושלום works; nor is it asking what saying חס ושלום is supposed to accomplish. All I'm asking here is why this phrase in particular is used.)
Taking a quick look at wikipedia here:
"Chas veshalom," (Hebrew: חס ושלום, ח"ו) - Heaven forbid, lit. compassion and peace
Another variation: God forbid.
Or to put it another way (from here):
may God bring mercy and peace upon us to prevent this from happening
For the second question (why say this): What else would/should you say?
חלילה is a Biblical Hebrew word meaning outside, foreign, profane. (Compare to חולין.) It can be, therefore, used as a sort of interjection, that it should be foreign, profane, to take such an action. In response to Yosef's steward's accusation that they stole the goblet, Yosef's brothers say: ז וַיֹּאמְרוּ אֵלָיו--לָמָּה יְדַבֵּר אֲדֹנִי, כַּדְּבָרִים הָאֵלֶּה; חָלִילָה, לַעֲבָדֶיךָ, מֵעֲשׂוֹת, כַּדָּבָר הַזֶּה. which mechon-mamre renders as: And they said unto him: 'Wherefore speaketh my lord such words as these? Far be it from thy servants that they should do such a thing.
חס is both a Hebrew and Aramaic word which means mercy, to spare something. For instance, in the Tosefta, שחס המקום עליו. Or in Yerushalmi, חס הוא אדם על כבוד אלמנתו. Jastrow lists it as both Hebrew and Chaldean (=Aramaic). An example from Tanach is in Yirmeyahu 13:14: פסוק י"ד: וְנִפַּצְתִּים אִישׁ אֶל-אָחִיו וְהָאָבוֹת וְהַבָּנִים, יַחְדָּו--נְאֻם-ה; לֹא-אֶחְמוֹל וְלֹא-אָחוּס וְלֹא אֲרַחֵם, מֵהַשְׁחִיתָם. "I will not spare and I will not have mercy."
When someone wants to say that something terrible should not happen, they may search for words that express different aspects of the idea, and form the idiom out of this. (A sort of hendiadys, perhaps, in which there is a conjunction, but both words function to establish the one idea.) Chas veShalom = mercy and peace, which is what there should be, for this should not happen. Or Chalila vaChas, far be it, and He should spare.
They are then, not, etymologically, the same word.
As Dave pointed out in the comment section to the other answer, Rabbi Eliyahu Bachur, in Tishby, writes as follows:
Thus, every Biblical instance of חלילה is translated in Targum as חס. That does not necessarily make them the same word, with a simple reduplication in the phrase. It is just that חלילה does not occur as an Aramaic word, and so Onkelos chose the closest idiomatic expression. Putting them together might be a hendiadys in the same way we observe for chas veshalom. On the other hand, maybe it is a reduplication. That this translation occurs consistently might have made them identical in speakers' minds. I lean towards the former, but can grant the latter possibility.
See also Jastrow's discussion here: