Nice one, yes. The transformation is achieved by a series of Payne rearrangements (painful... see what I did there?).
The last epimerisation was not proposed to proceed by intermolecular epoxide opening, but by a similar lactone hydrolysis pathway. As you are so close I will post the solution below.
Reference: Lundt, I.; Madsen, R. Top. Curr. Chem., 2001, 215, 177-191
From diepoxide 1
(you gave the mechanism for its formation so I won't repeat it), lactone hydrolysis followed by Payne rearrangement gives trans
, which is favoured over cis
then closes in a favoured 5-exo-tex fashion to give 5
. In accordance with Baldwin's rules, a 6-endo-tet ring closure, which would give 4
, is not observed.
Hydrolysis and Payne rearrangement of lactone 5
produces an equilibrium mixture of two trans
. However, intramolecular epoxide opening of 6
to give 8
is not observed as it would proceed by an unfavourable 5-endo-tet (the 4-exo-tet possibility is not shown). On the other hand, 7
could lactonise by a disfavoured 6-endo-tet (not shown) or a favoured 5-exo-tet, with the latter favourable process giving L-gluconolactone 9
is hydrolysed in base - which is irreversible in base - giving carboxylate 10
, in a thermodynamic sink.
Acidification of 10
finally allows acid catalysed lactonisation, giving L-gluconolactone 9
, which I think is all rather astonishing.