Nice. I should probably look into resonant orbit calculations myself when I do more insane missions(though I don't think it would have helped much with the one I did here because of there sheer number of assists). I'm not sure if the Mercury assist helps here. There is a method of saving fuel similar to this, called V-leveraging, but it works by raising your periapsis after getting an assist that lowers your orbit. This is more efficient than a standard injection(at least for Mercury, it probably depends on the planets mass and your orbital eccentricity). The messenger spacecraft did this to get to Mercury orbit. However you set up a resonant orbit from the assist without doing a burn at apoapsis. I don't think this changes your flyby velocity of Mercury, as pure assists only change your relative direction, not relative velocity.