Do dogs have good memory?

Yes.

Such as if they were abused earlier, they will always remember it.

they usually remember Bad things what happened to them or their owner.

or it could be the good things that they remember such as getting adopted

Dogs have excellent memory.