Yes the hinge point must be set back into the aileron or flap. The surface must be slotted to allow free movement at the hinge points. The hinge pivot points must be in line with each other and it is ok if they are set back at different distances. I would use G-10 for the extension of the fixed part of the wing instead of 1/64" ply since it does not warp. A good source for that is
www.fliteskin.com.