The suggestion ' defining a complete rewriting system' in one of the comments of BenjaminSteinberg yields the following proof:


We use the definitions and theorems in https://en.wikipedia.org/wiki/Abstract_rewriting_system#Normal_forms_and_the_word_problem

Let $ \Sigma^* $ be the free monoid in the alphabet $ \Sigma = \{ z_1, z_2, \hat z_1, \hat z_2 \} $. 
We define the rewriting system $ R = \{ \hat z_i z_i \to 1, \hat z_i z_j \to z_j \hat z_i : i, j = 1, 2 \text{ and } i \ne j \} $ and $ S $ be the equivalence relation on $ \Sigma^* $ which is generated by $ R $. Then $ \Sigma^* \to X $ via $ z_i \mapsto x_i $ and $ \hat z_i \mapsto x_i $ clearly induces an isomorphism $ \Sigma^* / S \to X $. Thus, we may identify $ X $ with $ \Sigma^* / S $. Then the starting question becomes: Is there exactly one $ R $-irreducible form in each class in $ \Sigma^* / S $. 

For that, we show that $ ( \Sigma^*, R ) $ is Noetherian and locally confluent. Then Newman's Lemma provides that $ ( \Sigma^*, R ) $ is also confluent (this is the door opener) and, therefore, canonical (also called complete). Those systems provide that there is exactly one $ R $-irreducible form in each class in $ \Sigma^* / S $.

For $ ( \Sigma^*, R ) $ being Notherian: 
There are only finitely many times, the rules $ \hat z_i z_j \to z_j \hat z_i $ can be applied on a word. Then the word is either irreducible or the rule $ \hat z_i z_i \to 1 $ can be applied for some $ i = 1, 2 $. But, this shortens the word. Hence, the second case only appear finitely many times. 


For $ ( \Sigma^*, R ) $ being confluent: 
Independent of this particular rewriting system, it is enough to check local confluency for words $ w $ of the form $ w = u v w $ and rules of the $ a v \to a' $ and $ v b \to b' $. But, in $ R $ are no such rules. Therefore, it follows trivially that $ ( \Sigma^*, R ) $ local confluent.
q.e.d 

I am a little suspicious that the statement (uniqueness in the question) followed more or less without effort. Either I made a mistake or the actual work was done by Newmann's Lemma.