There is no risk for an STD from a massage and handjob. Hands never transmit any STDs, including syphilis. Syphilis is transmitted by direct contact with a sore during oral, vaginal or anal sex. https://www.cdc.gov/std/syphilis/stdfact-syphilis.htm Direct contact means your mouth, genitals or anus has to come into contact with their mouth, genitals or anus.
Have you had any other sexual encounters?
Did you talk to your doctor about the mark you have? You really should let a doctor see that. If it's something bacterial, the antibiotics may clear it up, but if it's fungal, the antibiotics just might make it worse. You can get a syphilis test even while on antibiotics. That might help ease your mind.