You "only" need a few things:
- a way to measure distances with good precision (say +/- 10mm, maybe even better for very wide apertures); I doubt a dual-pixel smartphone can do this, but didn't try;
- a way to set the camera to desired focus distance (
doable, but requires calibration and clever math, as Canon's encoders use very large steps)
- even so, the focusing process will be open-loop, so I wouldn't bet on its reliability.
I've got
this sensor to try something similar (AF in very dark and/or unpredictable scenes) but... didn't power it on yet. Could be interesting to find out whether there's a market for such gadgets.
Why not just getting a camera with dual pixel AF? I've been documenting their internals during the past few months (and, to a lesser extent, years) to the point where porting ML became a relatively easy coding task (though, still a bit time-consuming).