The replica trick consists of the formula:
$$\overline{\log Z}=\lim_{n\rightarrow0}\frac{1}{n}\log\overline{Z^{n}} \tag{1}$$
where $Z$ is the partition function of a system and the overbar denotes an average (see for example The "replica trick" initial formula?).
When was this trick used for the first time? Is there an original reference?