The usual method is to ask highly qualified experts on the specific, narrow topic of the paper to referee that paper. For most research papers, the number of highly qualified experts is actually quite small—typically less than twenty, sometimes less than five. So if an author has submitted the same paper to multiple journals, and the editor of each submitted journal asks three of those experts for a referee report, there is a fair to good chance that the same expert will be asked for a referee report more than once