It does not sound like you were told he has a lung infection (asthma is not a lung infection).
I am sorry you guys have been having this stress.
That must have been frightening. It might help your child to learn relaxation techniques in case this happens again (or he fears that it will).
Perhaps the American Lung Association’s website in will have information about childhood asthma?
Here is another reliable source of information:
https://www.healthychildren.org/English/health-issues/conditions/allergies-asthma/Pages/Diagnosing-Asthma.aspx?
You need to figure out if your child has asthma, because if he does you need a plan for managing it. Good luck!