Equality is a highly polysemic word and might have to be defined on a case by case basis, according to your needs. A key question is whether you consider that two objects that do not share the same location and time can be equal. In other words you need to define an answer to the question: "can this distinct apple replace this distinct apple?" Does it matter to me, at the grocery store, whether I take this one or this one (because I just want any apple) or do these two apples have distinct properties that are relevant to me?
It's a matter of the definition that you chose to apply to your particular model, which depends on your purpose. Assuming two things equal when you can, allows you to greatly simplify your model (principle of economy). This allows you in particular to count items, de-emphasizing the fact that they are distinct.
For example, in Newtonian mechanics, two objects that are not in the same coordinates at time t, may be (roughly) equal in mass, energy, etc. are clearly not the same. You assume that F and mass x acceleration are "equal" because that is very useful.
It is relatively clear to me that relativity requires to think about "sameness" with more attention, since time is no longer absolute; what may happen in Quantum physics is beyond my current knowledge (in the latter case, I suspect that physicists try not to wander too far off the formulas, for fear of getting lost in philosophical mazes).
Sometimes the location (or some other secondary property) matters, sometimes it doesn't. In particular, we have the notion (useful in finance) of fungibility. Fungibility, as the word suggests (from Latin fungi "to serve [in place of]"), depends on the function of the object you are looking at. A one-dollar bill is absolutely "equal" to another one-dollar bill, provided it belongs to an issue after such and such date, and it is not damaged, etc. Or you don't want them to be "equal" because you are interested in their serial number. Indeed, the whole idea of finance is to disregard location as much as possible: whether your one-dollar bill is at bank A or bank B or in your pocket, it is still "equal" to another one-dollar bill. This is also how you get "clearing" between receivables and debts.
In any case, sameness (which intuitively, for a physical object requires sharing same location in space and time) is only one of the possible definitions of equality.
If you want to get a sense of what the various meanings could be (and assuming you are knowledgeable about programming or willing to become so) you could take a basic Lisp course. It is highly symbolic language where the creators had to bang their head about on the concept of equality, resulting in an impressive list of predicate functions with different nuances. Or perhaps you have already done so.