All the relevant velocities can be obtained from the vis-viva equation. The transfer/capture costs can then be derived from the $v^2 = v_e^2 + v_{\infty}^2$. I'm going to ignore Mercury's 7 degree inclination.
So let's look at the numbers.
Aphelion velocity for Mercury perihelion transfer: 20.43km/s
Aphelion velocity for Mercury aphelion transfer: 23.76km/s
That's a significant difference, resulting in an Earth $v_{\infty}$ of 9.35km/s in the former case, and 6.02km/s in the latter. Translated to transfer delta-vs, that's a 3.43km/s cost on top of Earth escape for a perihelion transfer, and 1.54km/s for an aphelion transfer.
So a 1.89km/s delta-v saving for a flyby mission.
But to get into an orbit around Mercury, the situation is the other way around.
At Perihelion, the $v_{\infty}$ of the spacecraft approaching is 7.45km/s
At Aphelion, the $v_{\infty}$ of the spacecraft approaching is 12.1km/s
That means a delta-v cost of 4.37km/s to get captured into a Mercury orbit from a perihelion transfer, and a 8.58km/s for an aphelion transfer. That's a 4.21km/s difference, much greater than the difference in the other direction at the Earth side. It gets worse as this manoeuvre must be performed by lower efficiency storable propellant, while the Earth escape can be done with a hydrogen oxygen upper stage.
So:
Aphelion transfers are better for flybys, perihelion transfers are better for captures
No mission has gone to Mercury directly though, opting for Venus flybys to lower the cost to a manageable level.