I am probably confused.  Your h seems always to be surjective.  What if C = Y, f = id, and C = X, and phi = constant map to point p of C?  Then we seem to need h to be constant. E.g. taking h = phi, and g = id, seems to work (and the minimum degree which occurs here is zero).  Is it possible your construction (essentially) works as long as the images of f and phi meet? I.e. that it works more widely, but that it is only when the image of f is actually contained in the image of phi that h is surjective?