The concern is valid, but in developed countries where exposure to wild polio is extremely unlikely, the currently preferred vaccine is an inactivated form that cannot itself cause polio.
In regions where it is endemic, the live oral vaccine is used. It has the advantages of being very cheap and since no injection is needed it is probably safer to use in places where sterile conditions are unlikely. In those areas, it is still safer than risking wild polio. The fact that recipients actually shed weakened polio for days may be an advantage rather than a risk.
But yeah, for the sake of discussion, smallpox is a less complex example than polio.