I'm not sure of the capabilities of CHDK, so I don't know if this is possible.
I often use full digital zoom on my S3 to help autofocus on a subject behind foliage, which is a bit like reducing the size of the spot focus square. Then I press MF to lock it, and zoom back to full optical zoom, no digital zoom, to take the shot.
Is it possible to program a button to make that jump from zero to full digital zoom, then back again?