How long in between you and the previous person using the sex dolls? Do you know?
Sex toys can transmit STIs, but usually, it's because the toy has been used on one partner and then immediately used on the other partner.
Once the germ is exposed to air, it starts to die and it's very, very hard to infect someone via surfaces after even just a few moments.
Unless the previous person was right in front of you, and you went immediately after him - within seconds - you had no risk of anything.
Also, syphilis is uncommon in most developed countries. I wouldn't worry about that at all.
If the condom covered your penis, didn't come off or rip, you used it just fine.
Here are steps to use a condom correctly:
To use an external condom correctly, follow these steps:
- Carefully open the foil packaging the condom is wrapped in, taking care not to tear the condom.
- Hold the tip of the condom between your finger and thumb to make sure it's put on the right way around and no air is trapped inside (the condom may split if air is trapped inside).
- Place the condom over the tip of your penis.
- While squeezing the tip of the condom, roll it down over the length of your erect penis.
- If the condom will not unroll, it's probably on inside out – start again with a new condom as there may be semen or sperm on it.
- Make sure that the condom stays in place while you're having sex. If it comes off, stop and put on a new one.
After ejaculation (when you've come) and while your penis is still hard, hold the condom in place and carefully withdraw your penis from your partner's body.
You should only take the condom off your penis when there's no further contact with your partner's body.
Wrap the used condom in a tissue and put it in the trash bin. You should never flush condoms down the toilet as they may block the toilet and can cause environmental damage.
(https://www.nhs.uk/conditions/contraception/how-do-i-use-condom/)