I agree with you that the legislation says you do not have to wear a mask in the above situations. That exemption protects you from prosecution under the covid legislation but it does not force any shop to serve you. The shopkeeper can ask the info from you but you do not have to provide it but there is a risk that you will not be allowed entry, rightly or wrongly.The SI clearly states that you don't have to wear a mask if you have a reasonable excuse for not wearing one. A reasonable excuse can include hyperventilation caused by the stress of wearing a mask, a heart condition or respiratory illness, distress,.........there's a myriad of medical conditions that could be exacerbated by wearing a mask.
A shopkeeper/supermarket manager can challenge you, but a simple polite response informing them that you cannot wear a mask will be met with an "OK". They cannot demand personal information from you, only recommend that you wear a mask.
In this instance, the law is clearly an ass. In all likelihood most people recognize that, but most people either don't know/understand the law or are simply afraid of straying from the herd.
I agree with you that the law is an ass in this case, as to my mind, it's not very clear. It needs to be clarified by the courts i think.