Proving Map with Order Condition is Group Morphism
The potential problem with $\phi$ is not the homomorphism property which you correctly verified but rather the well-defined-ness of $\phi$.
See, when you determine $\phi$ with the single relation $\phi(g) = h$, you are implicitly defining $\phi(g^N) = h^N$ for any $N \in \Bbb N$.
But in doing that you run the risk of assigning multiple values to the same element in $G$. After all since $G$ has order $n = \text{order}(g) \in \Bbb N$, the element $g^3$, say, is the same thing as $g^{3+n}$. How are you sure that their images under $\phi$: $h^3$ and $h^{3+n}$ are the same? If they are not the same, then $\phi$ would fail to be a function as functions must assign exactly one image per domain element.
So to verify that this does not happen suppose $g^s = g^t$ for potentially different $s, t \in \Bbb N$.
You must show $\phi(g^s) = h^s = h^t = \phi(h^t)$.
Well since $g^s = g^t$, by a well known fact of cyclic groups, we must have $n = \text{order}(g) \ \big|\ s - t$. But you assumed $\text{order}(h) \ \big|\ n$. So $\text{order}(h) \ \big|\ s - t$ i.e $\text{order}(h) \cdot k = s - t$ for some $k \in \Bbb N$. Hence $$h^{s - t} = h^{\text{order}(h) \cdot k} = \big(h^{\text{order}(h)}\big)^k = e_H^k = e_H$$ and multiplying both sides above by $h^t$ we get $h^s = h^t$ as desired.
Edit:
Also here is an example where $\phi$ fails to be well-defined if $\text{order}(h) \ \big|\ n = \text{order}(g)$ is not satisfied.
Consider the "map" $\phi$ generated by $\phi(g) = h$ where $\text{order}(g) = 2$ and $\text{order}(h) = 3$. If you like you can think of $g$ being the generator of the cyclic group $C_2$ and $h$ being the generator of cyclic group $C_3$. So what's the problem with "map" defined above?
Well $\phi(g^3) = \phi(g)^3 = h^3 = e_H$. But at the same time $\phi(g^3) = \phi(g^2 \circ g) = \phi(e_G \circ g) = \phi(g) = h$. In other words $h = e_H$ which is contradiction because the order of $h$ is $3$ while that of $e_H$ is $1$. So you can see that $g^3 = g$ is being assigned multiple values here and $\phi$ cannot really be a map.