Does that rule also apply to all verbs ending in -ic?
Yes.
There are very few verbs that end with -ic and almost all of them have the letter k in their progressive (-ing form) and participles (-ed form).
We add the letter k to their progressives and participles because we want the original pronunciation with the /k/ sound in their inflections. And if we don't add the letter k, the pronunciation will change (i.e. it will become /s/ rather /k/).
The letter c often gives the /k/ sound when it comes before the letters a (e.g. car), o (e.g. cot) or u (e.g. cup), or it's at the end (e.g. panic). Or when it comes before the letter k (e.g. pick).
By contrast, it gives the /s/ sound when it comes before the letters e (e.g. cent), i (e.g. city) or y (e.g. fluency).
Panic has the /k/, and if we don't add the letter k to its progressive or participle, its pronunciation will change from /k/ to /s/:
- Panicing/paniced: here the c comes before i and e respectively and will likely be pronounced /s/ rather than /k/.
Therefore, mimic becomes mimicking/mimicked, frolic becomes frolicking/frolicked, traffic becomes trafficking/trafficked, magic becomes magicking/magicked etc.
And almost all other verbs that end with -ic have -ck- in their progressives and participles.
So the main purpose of adding the k is to keep the original pronunciation.