There is no grammar rule here.
There is a rule of etiquette to place others before yourself. This rule of etiquette would mean that "you and I" is preferred to "I and you". The rule was "others first, self last". In formal speech it is usually observed.
When I was actually taught this rule, in year 1, many years ago, I was actually taught that the order had to be "God first, others next, self last". This kind of rule comes from a different age
Now here someone seems to have extended that rule to say "Others first, family next, self last", and so the order should be "You, my wife and I". Such a rule may be invented by speakers of languages that have more clearly defined hierarchies of honorific and humble language than English,(Japanese comes to mind).
How important is this? Not very important. It doesn't affect comprehension. Many native speakers don't follow the etiquette rule anyway, and many use a different rule for the pronoun "me" or "I" in compound subjects.
I'd recommend using "You, my wife, and I" in particularly polite or formal contexts (or when doing an MC test to get a new job). In many other situations, you can apply a different rule: "Use 'I' when the subject is singular first-person" In this case, the subject is a phrase consisting of three people, so it isn't singular first person. Applying this rule gives "I was..." but "You and me were...".
In the exact context I'd prefer:
Please try to remember when we were talking with my wife.
And note that this is a very strange request to make. It sounds as if you are judging someone on their failure to remember the conversation. Like a police officer interviewing a witness, but why would the witness have been talking with the police officer's wife?. It's very odd.