There are no special rules to take into account when stopping a distributed system. You can stop TREX in any order on the individual hosts.
When you start a distributed system, the type of data storage dictates whether there is a defined sequence.
The hosts mytrexhost1, mytrexhost2, and mytrexhost3 are configured as master name servers. mytrexhost3 has not been operating for a while, which means that its topology file is not up-to-date. Changes that have been made since (such as new indexes) are not known to this host.
You also stop TREX on the remaining hosts for maintenance reasons. If you now want to restart TREX, you now have to start it on mytrexhost1 or mytrexhost2 first. These master name servers have up-to-date topology files.
If you were to start TREX on mytrexhost3 first, the system would be based on an out-of-date topology file.
The master name servers compare their topology files at startup. If the files are different, the master name server saves the files as topology.<date>.old and topology.<date>.new. This allows the correct topology to be restored even if the required start sequence is not observed.
If this happens in your system, contact SAP Support.