The first step should be to establish a diagnosis of your daughter's breathing problem. The ER doctors may have some opinions on this. Hives are often an allergic phenomenon as is the most common breathing problem, asthma. She may well have asthma and, if so, that could predispose her to a lingering cough following a viral infection, such as the "flu", be it actually influenza or other.
It would be wise to seek consultation with an asthma specialist, either a board certified allergist or a pulmonologist.
Oh my goodness my heart goes out to you! You're poor baby! I am a mom, no medical professional, so take my thoughts as a grain of salt.
What stood out to me was the "chronic hives". I had that temporarily as a child. It actually turned out to be dermagraphism in my later years (it vanished and then resurfaced). My allergist said that people who have it, often times have Auto Immune diseases. He tested me, and I have Hashimotos (my immune system attacks my thyroid).
None of my conditions come close to matching your daughters...but I just wonder if the chronic hives was stage 1 of a immune system problem.
It could also be progressive allergies. When I was little, I was allergic to my moms some 15 pets. My doctor informed me a couple years ago that chronic exposure to allergens will damage the lungs and lung tissue. And it will cause progressive weakening of the immune system and cause permanant lung damage. Your daughters' immune system does sound compromised, and her lungs are being greatly affected too; hence, why I suggest allergies and auto-immune problems. Could be food, pillows, or something else.
Last thought.. A high school I attended in IL was having remodeling done to it. It was old, moldy and likely full of aesbestos back then. Most of the kids at school were getting chronically sick. It was bad. Whatever was being released in the air was horrific. You may want to call the school and see if other kids are falling into the same absentee program your daughter is on. If so, the problem may be at the shool (if she keeps getting sick after being there for a day or two).
My overall suggestions: allergy tests and blood tests for auto immune problems.