For a trans person, correcting others comes with a fear. Fear that they will not be accepted or be subject to outright hostility. These badges not only help them feel safer but allies are wearing them too, which means that the chances of being challenged on their gender is reduced.
I can't understand why wearing a badge that is, effectively, challenging someone's perceptions is going to make a transperson in a public-facing role any safer.
If someone would be hostile to a member of staff because of a mismatch between the customer's perception of the staff member's gender and the gender with with which they identified, the customer would, presumably still be objectionable and unpleasant if the staff member had on a badge that declared them to be of an apparently 'mismatched' gender. If, on the other hand, there were no badge, the chances of the customer stopping to think about the matter are probably slim to none.
As has been said upthread, most people really don't care who sells them their knickers or their Dine In For Two food. Wearing gender badges seems more like a challenge to bigots than a gesture of solidarity, and it is transpeople who are likely to suffer.
M&S would do better to have a zero-tolerance policy towards anyone who is rude to their staff, and leave people to make their own decisions about self-declaration of gender.