「龖」is indeed thought to be the phonetic.
Since these characters were created very early on, we need to use our best guesses of the sounds of these characters when they were created to make sense of the phonetic components. Zhengzhang's Old Chinese reconstructions gives
- 龖: /*l'ɯːb/
- 襲: /*ljɯb/
- Middle Chinese: /ziɪp̚/, Mandarin: /ɕi³⁵/
Bypassing a detailed treatment of the phonology involved, a very simplified explanation is that consonants pronounced at a similar place of articulation and vowels articulated with similar tongue positions tend to change into each other over time.
To see the relationships between the consonants according to their different places and manner of articulation, you can view the columns and rows of the IPA table given in Wikipedia:
Paleography and semantics
In the modern form, the two「龍」have been reduced to one in「襲」.
The original meaning is indeed to do with fabric on clothing for dead people, extended to mean layer upon layer of clothing, then finally carry on and on; following customs, traditions. This meaning is written as「沿襲」.
The link between clothing and attack is obscure, if any, and is more likely to be a rebus borrowing.
If you must link clothing with attack, a rather far-fetched way to analyse it is through the following series of extensions (the meanings of which have actually all existed in literature):
Layers upon layers of clothing > to hide or conceal something > surprise raid/attack > attack.