Erotic massage is considered a relatively safe activity when it comes to passing STIs.
There are some infections that you still have to be aware of that can be passed through skin to skin contact. These are Herpes, Syphilis, Molluscum Contagiosum and HPV. These are most often passed through oral to genital or genital to genital contact but there is a small risk that these infections could pass through oral to skin or genital to skin contact; In other words, if a person who has the herpes virus on their genitals is rubbing their genitals against the skin on your leg the virus could pass to you. This is not typically how we see these infections being passed but there are cases where it has happened.
To make massage safer, avoid contact with the genitals or the mouth of the person giving you the massage.
Please leave a comment to let us know if this answers your question or if you need more information.
For other readers, please feel free to leave a comment, or let us know if this was helpful.