One way to achieve what you're trying to do would be to use strings and consequentially using the sym()
function as illustrated here to convert them to symbolic equations as and when needed.
In doing so, whenever you need to relate to the referenced equations, you can simply compare their string versions which would remain unchanged.