How does a string store information during wave superposition?

Let's look at it this way:

As an observer, move along one wave on an infinite string, so that it appears motionless to you. It is just a bump on the line.

Consider the other, moving wave. You can see it move towards the bump, move above it, and move past it. That moving wave has always kept its shape, even when it was travelling over the bump. So, there is nothing special happening when the two waves encounters - each one sees the other one as a bump on its way; that's superposition. No need here for any more 'memory' than when there is no bump (no other wave).

In other words, the need for a 'memory' of sort only arises because when you see the two waves superposing, you do not recognize their previous shapes, you do not 'see' in the overall shape the separated waves that you previously identified. But the way we make sense of what we perceive can be tricky - and in that case, if it may seem to you that some 'memory' is needed, then even a single travelling wave that you always can 'see' would still need this 'memory' to keep its shape. Again, nothing special here with regard to superposition.