We generally prefer not to use advice-add etc. in our own code. What
I had in mind was to modify the places where such messages originate,
and make them use delay-message under the right circumstances. If
there's some mechanism to do this without changing each place, I'm
okay with that, but using advice is not one of them.
Besides monkey-patching the message function in an even dirtier way, I don't think that would be possible. I don't have the time nor the energy to review every possible module that is messaging during startup. I could add an option for message to redirect its messages to some other place, but I don't see any advantage in doing so.
FWIW, I cannot reproduce this on my system. In fact, I cannot even
reproduce your original reported issue with visiting a
shell-scrip-mode file: I get a new frame with the message, and no old
frame is raised. Are you using something other than "emacsclient -c"?
emacsclient -c
Then opening my .bashrc with
emacsclient -t
Raises the first frame.
The daemon was launched with -Q.