Let $A$ be a commutative ring, and let $f$ and $g$ denote elements of $A$ such that the prime ideals of $A$ containing $f$ are precisely the prime ideals containing $g$ (a not completely trivial example of this phenomenon would be $f=r^2$ and $g=r^3$ for some element $r\in A$). If $D(x)$ denotes the set of prime ideals of $A$ which don't contain $x$, then we hence have $D(f)=D(g)$.
If $M$ is now an $A$-module, then Grothendieck in EGA1 (on his way to defining a sheaf of modules on an affine scheme) would like to associate an abelian group to the set $D(f)$, and he chooses the localisation $M_f=M[1/f]$. He'd also like to associate an abelian group to the set $D(g)$, and he chooses $M_g$. The thing is that $D(f)$ and $D(g)$ are equal, and from a strict set-theoretic point of view $M_f$ and $M_g$ are not (at least according to Grothendieck's definition of localisation in EGA0, and assuming the standard set-theoretic model of the quotient by an equivalence relation as a set of subsets). However Grothendieck argues that this doesn't matter, arguing that both $M_f$ and $M_g$ are canonically isomorphic to the localisation of $M$ at the multiplicative subset of $A$ consisting of elements which don't vanish on $D(f)=D(g)$, or in other words at the saturation of both the ideal $(f)$ and $(g)$, and hence are canonically isomorphic to each other. As we can see in the below screenshot from EGA1, Grothendieck uses the notation $M_f=M_g$
to denote this canonical identification.
This idea of using the symbol $=$ to mean something more delicate than the standard ZFC usage of "having the same elements" is prevalent in algebraic geometry, and history indicates that it rarely if ever causes any problems. For example in Milne's book on etale cohomology, written in 1980, we see the following in "Terminology and conventions" on page xiii:
so one would imagine that by 1980 this convention had become standard. My question is whether the convention of using $=$ to denote a canonical isomorphism was due to Grothendieck in 1960 in EGA or whether anyone knows of a historical precedent. For example are there earlier works in homological algebra which use this kind of convention? According to this MO answer Weil was talking (rather sarcastically!) about the concept of a canonical map in 1959, which makes me wonder about whether this use of $=$ was already prevalent in some of the literature.
Just to make sure that the conversation doesn't get derailed: I know that in some other foundations of mathematics (for example in univalent type theory) one really can construct a term of type $M_f=M_g$; however this is not relevant to my question, because these univalent ideas came historically much later, and Grothendieck was using set-theoretic foundations anyway. I am well aware that under some simplifying hypotheses (for example if $A$ is an integral domain) one could argue that $A_f$ and $A_g$ are equal as subsets of the field of fractions of $A$, but at this point in EGA1 it is essential that we do not work under these simplifying assumptions. Finally, I am also not particularly interested about whether it is a good idea to use $=$ to mean more than one thing; my interest here is purely historical.