This is a good idea. But not every relay will do it, and the key could change. There might be more than one key or multisig. You end up with edge cases. But in principle this could be better. Agents with relays as first class nostr citizens. Perhaps they can be a subset of the relays.
Discussion
Yup, or if I publish an event to a relay that does have a pubkey I’ll prefer it when leaving hints
The other option is I publish as hint an “a” tag of a 30022 relay set NIP-51 which I can update at any time with the relays the event will be at, though this starts to get too complex and probably not worth it
The replace-url-with-pubkey is probably good enough imo