Certain messenger molecules fight damage to the lungs from noxious air by telling the muscle cells encircling the lungs' airways to contract. This partially seals off the lungs. An asthma attack occurs when the messenger molecules are activated unnecessarily, in response to harmless things like pollen or household dust.
Such a medication would be unable to distinguish between messages triggered by pollen and household dust and messages triggered by noxious air points to the most serious flaw of a plan to develop a medication that would prevent asthma attacks by blocking receipt of any messages sent by the messenger molecules referred to above.