The virus that causes warts (equine papilloma virus) is contagious, warts are not. Actually, warts is common in a lot of species, dogs as well- which is totally gross btw.
By the time you have warts appear, exposure has been 3-4 weeks and the horse has generally shed the virus or on the way to immunity. Outbreaks occur in groups if you have herd turnout etc, share buckets blah blah.
Some babies get it, some don’t. Some babies never get it and as they get older, their immune systems are no longer susceptible. Basically, you have to ride it out until it clears their system (usually 30-90 days but up to 1 year).
It’s pretty harmless. I did my thesis on a DNA virus that is related but not so nice.
If your baby has warts, you are prob not at risk for spreading the virus.