OK let's get back to basics.
First why did it take so long to get your iPad connected to the z21 with its WiFi router? When I got mine a couple of years ago, it was very simple, just connect the z21 and router together using the supplied LAN cable, turn them both on, and then connect my iPad to the Z21 network. I then added a decoder to a loco and it ran at address 3, this took about half an hour.
Second do you have a blue light on the z21 and on the app on your iPad when you are using it?
Third, have you tried to read back the loco address with the z21 app?
Regards,
John P