Ah yes, then it’s max 15 direct connected devices.
I think you’d bite the bullet and rebuild your mesh.
That would mean you’ll break all related flows, because unfortunately Homey assigns new Device ID’s to formerly connected devices.
But, you can fix your flows quite easily with that neat script by Martijn:
Note:
Do save all related zigbee device ID’s before you start removing devices.
.
You shouldn’t have to rebuild your network in theory. But the best start is to first add a few router devices (most mains powered sockets/lights/switches/dimmers), evenly spreaded around the house.
A zigbee mesh is dynamic, the devices should find and use the most optimal route to the controller; in real life most devices stick to their route when they’ve determined it’s good enough.
Certain Aqara end devices (contact sensors) ate known to stick to their route, no matter what.
In those cases it’s best to re-pair (so not: remove and pair) such a device at or near it’s mounted location