There is no way to do it - Ids are dynamically generated in the order you access objects by path (and so are potentially unqiue to each patch instance).
If you cant access an object by path, then there is no way to recall it. This also means you cant change track the path either to keep pattr store updated, for example, because the user moved the device from one track to another.
The problem with accessing devices inside racks appears to be only one of live.path addressing capability as you have shown, so I guess its time for someone to start a feature request campaign for this ;)
Devices definately NEED a devices child for rack devices IMHO - its a right pain that it doesnt appear to exist.
I also think ableton/cycling need to provide a change-tracked and thread safe parameter store for live paths as well - yes you can do it in MAX, but getting it all working correct and tracking path changes with crashing horribly from threading issues is a bit of a mare (yes - seems it needs to be thread safe too - urgh!).