The rate of stellar encounters along a migrating orbit of the Sun