Aqara’s have a tendency to stick to their original routes, even if these routes do not work anymore. And my experience is too that if these routes were gone for long and come back, Aqara’s don’t seem to recover.
Original (pre 5.0 firmware) advice was to pair real near to Homey. But Homey only allows about 15 directly connected devices. My guess is that after a reboot pairing directly to Homey has more chance of success. But after a while all devices reported in and the 15 connections get filled, leaving the surplus dead in the water.
My experience with 5.0 firmware is that a Zigbee reset fixed a lot of my problems, both by getting rid of old shakey configuration and selecting a better channel. I paired routers first and the rest in the place of destination. That way I made sure the best available router is used for pairing too, avoiding too many direct Homey connections. Pairing was way quicker too. I have a stable and fast mesh now.
The routing table in Homey Developer sucks. Sorry for the harsh words, but I do not trust it a bit. Broken routes are listed that work perfectly, battery operated often show no route and work perfectly. Check it, but don’t assume it is all true.
When I got to about 50+ devices and a few major firmware releases later pairing got hard again. Unless I pick a hard to reach spot for Homey, and close to a Philips Hue bulb. Then I can quickly pair again. This strengthens my belief that my above guesses were not far away from the truth. If Homey is too near a direct connection is attempted and fails, if Homey is out of reach pairing works fine through good routers.
Oh, and don’t ever unplug Zigbee devices. You are killing routes and again, Aqara’s don’t like that, and quite likely other devices are affected as well.