How can I set the priority of Wi-Fi networks on my iOS device?
I'm pretty sure this is not possible to do on vanilla iOS, perhaps with a jailbreak.

However, your solution of running two separate WiFi networks is generally not what you want. It is much more common to extend one WiFi network (i.e. a single SSID) with multiple routers. Devices should then automatically switch to the access point with the stronger signal.

You can check this question which describes how to setup two APs for the same network (i.e. a single SSID).