sure, it's perfectly fine.
There are a couple of ways to go about setting everything up. Here's how I'd do it.
NOTE - I am assuming you have a relatively recent controller version (4.x or 5.x)
EXISTING CONTROLLER
1. Create backup file, then shut down.
EDGEROUTER
- set up subnet2 on eth1
- if ER-5 has 48V PoE, enable on eth1
- Set up DHCP server for subnet2
UC-CK
- Plug into ER eth1
- After booting, find what IP address it grabbed, and navigate there in a browser (https://ip.of.uc.ck)
- You'll see two options (Launch Unifi Controller / Launch Device Management). Use Device Management and upgrade the UC-CK to the latest version. Also set a static IP if you want (or set the DHCP reservation on the ER)
- After it reboots, run UniFi setup wizard, and load the *unf backup
BACK TO THE ER
- If you choose to use DHCP reservation for the UC-CK, set that. otherwise, skip to step2
- In the DHCP server for subnet1, add the IP address of the UC-CK in the "UniFi Controller" field
UAP
- reset to factory defaults (either ssh in, or with a paperclip)
- if you go the paperclip route, BE GENTLE WITH THE BUTTON
- UAP will reboot, pull an IP from the DHCP server, and learn of the UC-CK.
- Since the UC-CK was set up with the backup from the old controller, it should relatively quickly re-adopt the AP, and reapply networks / overrides / etc. that you had previously set.