I think I can see how to prove this now under the assumption that $G$ is powerful. I think the same approach would work without that assumption, but would involve eliminating more cases.

We are given that $G$ is a $2$-generated group, and that the upper central series of $G$ is $1=Z_0 < Z_1 < Z_2 < Z_3 < Z_4 = G$ with $|Z_1|=3$, $|Z_2|=27$, $|Z_3| = 243$, and $|Z_4|=|G|=2187$, with $Z_2/Z_1$, $Z_3/Z_2$ and $Z_4/Z_3$ elementary abelian

My approach is to identify the quotients $G/Z_i$ for $i=3,2,1,0$. I will just sketch the proof for now, and I can fill in details later if necessary.

We know that $G/Z_3 = C_p^2$ is elementary abelian. and it is not hard to see that $$G/Z_2 \cong \langle a,b \mid a^9=1, [[b,a],a] = [[b,a],b] = 1, b^3 = 1\ {\rm or}\ [b,a] \rangle.$$
Since the group with $b^3=1$ is not powerful, we can assume that $b^3 = [b,a]$ and in fact $G/Z_2 \cong \langle a,b \mid a^9=b^9=1, a^{-1}ba=b^4 \rangle.$

The hardest part is to identify $G/Z_1$, but using the facts that it is a powerful 2-generated group with centre is $Z_2/Z_1 \cong C_p^2$, it can be shown that $$G/Z_1 \cong \langle a,b \mid a^{27}=b^{27}=1, a^{-1}ba=b^4 \rangle.$$

The final step, showing that $G \cong \langle a,b \mid a^{27}=b^{81}=1, a^{-1}ba=b^4 \rangle$ is similar but easier.

${\bf Edit\!:}$ Since we would prefer to prove this without assuming that $G$ is powerful, we need to eliminate the possibility that $b^3=1$ in $G/Z_2$. So assume that $b^3=1$ in $G/Z_2$ and now replace $a,b$ by inverse images in $G/Z_1$.

Suppose that $a^{-1}ba = bt$ in $G/Z_1$. Then $a^{-1}b^3a = (bt)^3 = b^3t^3[b,t]^3 = b^3t^3$, because $[b,t] \in Z_2/Z_1$. So, since $b^3 \in Z_2/Z_1$, we have $t^3=1$.

But then $b^{-1}a^{-1}b = ta^{-1}$, so $b^{-1}a^{-3}b = t^3 a^{-3} = a^{-3}$, and so $a^3 \in Z_2/Z_1$, contrary to assumption, because $a$ has order 9 in $G/Z_2$.

So we have determined $G/Z_2$ up to isomorphism without assuming that $G$ is powerful.

A similar, but more complicated calculation, reveals that there is one other non-powerful (powerless?) possibility for $G/Z_1$ other than the one above, which is
$$\langle a,b,t \mid a^{9} = b^{27} = 1, a^{-1}ba=b^4t, t^3=[a,t]=[b,t]=1 \rangle,$$
where the generator $t$ is redundant. (This is $\mathtt{SmallGroup}(739,32)$, and the other (correct) option above is $\mathtt{SmallGroup}(739,22)$.

A similar argument to the one above shows that that this other option does not extend further to a group $G$ of order $2187$ with the required properties.

Although it is helpful to check things by computer, this can all be done by hand, and I can add further details if necessary. Of course whether you really gain much additional insight by doing it by hand rather than computer is an interesting question!

1more comment