Just by chance I’ve read two Max Brand cowboy novels so far in my life and the plots are pretty much identical. Both were written in the 1920’s and each involves a mastermind of sorts. However, the word “mastermind” doesn’t occur in either novel, though one has to think that if the word had been available, the author probably would have found a use for it. OED1 has no entry for it whereas AHD (1967) does.
I guess the question that comes to mind is whether the origin of the word or concept was in the genre of, or predates, the spy novel. Professor Moriarty maybe? (It’s also interesting that Brand seemed to combine two genres.)