The two sides settled for a 1-1 draw in the first fixture and were on course for a similar result in the return clash after defender Jean-Kevin Duverne cancelled out Naim Sliti's 28th-minute opener for Dijon.
That was until gloveman Vachoux dawdled on the ball and allowed a quick-thinking Wesley Said to squeeze in a second for Antoine Kombouare's side in the 70th minute.
Said's neat finish put Dijon back on track to preserving its Ligue 1 status and a 4-2 aggregate triumph was confirmed courtesy of another Vachoux blunder.
The 24 year-old charged out of his area and succeeded only in colliding with centre-back Steven Fortes, who had to be taken off on a stretcher and transferred to hospital for further examination.
Sliti swooped on the loose ball and sealed Dijon's place in the top tier for at least another 12 months, while Lens is consigned to another season in Ligue 2.