Zoom-in on the dust-obscured phase of galaxy formation with gravitational lenses