For the record: I have served as a managing editor on 2 editorial boards for many years (currently, just one board) and as a regular editor, on one more board. I encountered the situation you described in both capacities (my papers were submitted to "my journal") and I refereed editors' papers for other journals.
It is normally expected that the editor handling a paper keeps the author of the paper (another editor) out of the loop, regarding the identities of the referees; this is done, for instance, by using non-editorial email to contact referees, receive referee reports, through software used for the submission/evaluation process at the journal, etc. Any reputable journal will try it best to follow this. Of course, there is always a chance that something will go wrong...
Personally, the way I write my referee reports is so that I never say anything anonymously as a referee that I would not be willing/able to say openly to the author. This way I never have to worry if an author discovers or guesses correctly that I was a referee (this also has happened to me few times).
How much are you willing to trust the system to do the right thing, is your call...