The challenge here is that there is no a priori bound on the number of factors. So, to express the fundamental theorem of arithmetic in a first-order theory such as Peano arithmetic, you first need to show that the theory is able to express the idea of quantifying over finite sequences. The machinery to do this is well understood; one commonly used method is the $\beta$ function introduced by Kurt Gödel.
The general idea is that the final sentence will say "for every $n > 1$ there is a finite sequence $\sigma$ such that (1) each number appearing in $\sigma$ is prime, and (2) $n$ is the product of the numbers appearing in $\sigma$."
The definition of irreducibles which is mentioned in the question is perfect.
Now you may observe that there are elements (say $p$ ) in $T$ such that for any $a,b \in T$, $p$ divides $ab$ implies that $p$ divides $a$ or $b$. We call such elements as prime in $T$. For example, $7$ is a prime in $T$ because $7$ is a prime in $\mathbb{N}$ and we can make use of Euclid's lemma to conclude. Note that $7$ is also irreducible.
Also we can see that $10$ is not a prime in $T$. To see that we take the same example which you provided, take $ab = 100, a= 4, b =25$, so $10$ divides $100$ but none of $a,b$.
It is possible that an irreducible $p$ (such as $10$) can divide $1^{e_1}\cdot 4^{e_4}\cdot 7^{e_7}\cdot 10^{e_{10}}... $ without dividing any of $1,4,7, \dots$, etc.This was a flaw in the argument.
You can easily apply your argument to the sets where each irreducible is a prime in that set.
Update:
I think OP considering as Euclid's lemma is the generalization of Euclid's lemma given here - https://en.wikipedia.org/wiki/Euclid%27s_lemma .
It says that
Euclid's lemma — If a prime $p$ divides the product $ab$ of two integers $a$ and $b$, then $p$ must divide at least one of those integers $a$ and $b$.
Note that the lemma does not make use of the concept of $\gcd$.
I don't think we can show that the lemma does not hold in $T$ without exhibiting counterexamples. When we define a new structure on sets, we appropriately define a set of rules or axioms which the elements of the set should satisfy.
Best Answer
The numbers of the form $4k+1$ are missing some primes. Hilbert introduced this example to show why the theory of ideals was needed in higher algebra. T
At the heart of it, we're missing the $\gcd(9,21)$ and the $\gcd(49,21).$ In the ordinary integers, we aren't missing these numbers, but in Hilbert's system, they're not there and this is what causes the non-uniqueness of factorization. We can group the missing numbers in two different ways.