All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
You bear no sin for touching the hand of a non-Mahram woman unintentionally; Allaah The Exalted says (what means): {And there is no blame upon you for that in which you have erred but [only for] what your hearts intended…} [Quran 33:5]
Ibn Katheer commented on this verse saying, “It means that the sin is on the person who deliberately does something wrong.”
You are not obliged to wear gloves for fear of accidentally touching a woman's hand; it is enough for you to be keenly mindful of avoiding touching her. If it happened unintentionally, then you would bear no sin for it.
May Allaah increase your desire to carry out good deeds and avoid sins.
For more benefit, please refer to Fataawa 173497 and 84131.
Allaah Knows best.