I would rephrase it this way: I want to thank you and Peter as well.
I do not know any principle, sorry. Nevertheless, people do not tend to use a pronoun several times in a sentence as it obviously sounds reduntant. I avoid redundancy at all unless I am about to try to make puns, emphasize a meaning, write a poem, etc.
So, Yes you can but avoid it
Student or Learner