Does bronchoconstriction help protect the body from infection?

No. Bronchoconstriction means the tubes in the lungs are getting smaller than normal due to something like asthma or pressure from something outside the tubes, like a growth or infection. Either of these conditions makes infection more likely, not less likely.