Wouldn't it be possible to code the Tor clients to not build circuits using relays in the same /24 or with "similar" names?
Tor already avoids using multiple relays in a given /16 subnet. https://gitweb.torproject.org/torspec.git/blob/HEAD:/path-spec.txt#l184