I bet your dog is "just" coughing, or reverse sneezing. My chihuahua does it all the time...but it will come and go in spurts. Your baby may have allergies too. A collapsed trachea is possible....I think you can rub on your dogs neck, gently,not too firm, and if that instigates a cough, it could mean it is the trachea. My vet told me when my dog is reverse sneezing (honking) to gently massage the neck area to calm them down. Does that make sense? So do a test rub and see if that makes your baby start up the breathing thingy.
I am sorry, I know how worried you must be.