I have been trying to come up with an abstract definition of what an equation is. What I have so far is the following:
Let $X$ and $Y$ be two not necessarily unique sets such that $Y$ has an equivalence relation $\sim_Y$ defined on it.
An equation is an expression of the form
$$f(x) = g(x)$$
where $f,g: X \to Y$ are arbitrary functions. A solution to the equation is any $x^\ast \in X$ such that $f(x^\ast) \sim_Y g(x^\ast)$.
Have you ever stumbled upon someone who discusses this topic? If so, could you point me to their work?