When do Mercury/Venus reach greatest elevation at sunset/twilight for a given location? On what day does Mercury reach its greatest elevation (in degrees from 
the horizon) at sunset a given location? 

The obvious answer is the day of Mercury's greatest elongation from 
the Sun, but, since the ecliptic is slanted with respect to the 
horizon, I'm not convinced this is correct. 

In other words, on the day after greatest elongation, Mercury's total 
angular distance from the Sun will be smaller, but it's vertical 
distance in elevation (for a given location) at sunset might be 
higher. 

Same question for Venus, and for when the sun is 6 degrees below the 
horizon (ie, civil twilight), and for sunrise/dawn. 

I'm guessing the date might vary based on position (mostly latitude) since the ecliptic's slant varies at different locations.

I googled and found nothing. My (preliminary and possibly wrong) 
expierments with stellarium show that Mercury's elevation at sunset IS 
higher 1-3 days after its greatest elongation, but by less than 1/2 
degree.

So, it's possible that the date of greatest elongation is a close 
enough approximation.
You can take a look at this table - it's in Dutch, but the dates and numbers in the table shouldn't be too hard to understand.  The first date is that of the greatest elongation (GE), the second (halfway the columns) that of the best visibility (BV).  You should ignore the lines with red dates - they're unfavourable appearances, and the code may find a date far from that of the GE.  The table shows that the difference between the moment of GE and that of the BV is typically a few days, although it can be about a week. (You can click on the first date for a page which includes a sky map of the appearance at constant Sun altitude (-6&deg; I believe)).

Venus is a different story, because it is usually visible for months.  As you may know, in the northern hemisphere morning appearences of the inner planets are unfavourable in spring and favourable in autumn, and for evening appearances this is the other way around.  The table shows that Venus had its GE (west/morning) on 8 June 2001, but was best visible on 22 August.  In the mean time, the planet had moved somewhat closer to the Sun, but the effect of moving from spring towards autumn was clearly stronger (click the date link for the weird map that goes with this).  Hence, for Venus the difference can be several months.

Of course, these are just examples for one location (52&deg;N).  I think the process may be too complex to be described by a single, simple equation.