There are two different kinds of manoeuvre (or at least two ends of a range) being conflated here.
A gravity-well manoeuvre is a powered manoeuvre. By using propulsion deep inside a gravity well, a spacecraft can get more eventual change in velocity for less fuel expended. This can be seen in two ways:
- The spacecraft converts some of the potential energy of the fuel into velocity, as well as the chemical energy
- By dropping down into a gravity well and then accelerating so as to rise up more quickly then you dropped down, the gravity of the source of the well pulls you forward for longer and backward for less time, giving you a net benefit.
However you think of it, you get a net benefit. This is the Oberth effect.
This kind of manoeuvre is seen, for example in the Gallileo, Cassine and Juno missions, each of which made its main burn to enter orbit as close as the mission planners dared to its target gas giant.
If you wanted to launch a deep interstellar mission, taking advantage of the Suns gravity well in this way could be a good idea. You'd want to get as close to the Sun as you could, though, Mercury is probably not close enough.
A gravity assist is an unpowered manoeuvre (more or less) in which you use the gravity of a moving (relative to the Sun say) object to deflect your course (relative to it) in such a way as to get a net benefit relative to the Sun. These are seen in many missions, for instance the Voyagers, or New Horizons at Jupiter, or Juno at Venus and Earth. The main consideration here is mass of the planet you are using, so in the inner solar system Venus and Earth tend to be preferred, while in the outer system Jupiter is king.
In either case, the main problem is that Mercury is too small, and also not close enough to the Sun.