Analytical Theory of Numbers – Integral Product Estimation of Terms $ cos (t log p) $

I would like to prove the following proposition of A. Harper's document "Strong conditional upper bound for moments of Riemann Zeta's function"

Proposal.
Let $ T $ to be tall and leave $ n = p_1 ^ { alpha_1} cdots p_r ^ { alpha_r} $, or $ p_i $ are distinct prime numbers and $ alpha_i in mathbb {N} $ for everyone $ i $. then
$$ int_T ^ {2T} prod_ {i = 1} ^ r cos (t log p_i) ^ alpha_i dt = Tf (n) + mathcal {O} (n) $$
or $ f (n) = 0 $ if one of the exhibitors $ alpha_i $ is strange, and if not
$$ f (n) = prod_ {i = 1} ^ r frac {1} {2 ^ {{alpha_i}} frac { alpha_i!} {(( alpha_i / 2)!) ^ 2} $ $

He says that there is a slight variant of Lemma 4 from Radzwill's article on Selberg's central limit theorem, noting that the error is estimated there. rather generously and that it can actually be taken into account. $ mathcal {O} (n) $.
The proof continues as follows: consider the prime numbers $ q_1, dots q_k leq x $ with $ q_1 cdots q_k = p_1 ^ { alpha_1} cdots p_r ^ { alpha_r} = n $. Since $ cos (t) = frac {e ^ {it} + e ^ {- it}} {2} $ we have
$$
cos (t log p_i) ^ { alpha_i} = frac {1} {2 ^ {{alpha_i}} (e ^ {it log p_i} + e ^ {- it log p_i}) ^ { alpha_i} = frac {1} {2 ^ { alpha_i}} { alpha_i choose alpha_i / 2} + sum _ { substack {0 leq ell leq alpha_i \ ell neq alpha_i / 2}} frac {1} {2 ^ { alpha_i}} { alpha_i choose ell} e ^ {i ( alpha_i-2 ell) t log p_i}
$$

Therefore
$$
int_T ^ {2T} prod_ {i = 1} ^ r cos (t log p_i) ^ alpha_i dt = int_T ^ {2T} prod_ {i = 1} ^ r left ( frac {1 } {2 ^ { alpha_i}} { alpha_i choose alpha_i / 2} + sum _ { substack {0 leq ell leq alpha_i \ ell neq alpha_i / 2}} frac {1} {2 ^ { alpha_i}} { alpha_i choose ell} e ^ {i ( alpha_i-2 ell) t log p_i} right)
$$

which equals
$$
Tf (n) + sum _ { substack {0 leq ell_i leq _ { alpha_i} \ text {for all} 1 leq i leq r \ text {not all} ell_i = alpha_i / 2}} int_T ^ {2T} prod_ {i = 1} ^ r frac {1} {2 ^ { alpha_i}} { alpha_i choose ell} e ^ {i ( alpha_i 2 ell) t log p_i} dt
$$

He then says that the number of terms of the sum is $ leq ( alpha_1 + 1) cdots ( alpha_r + 1) leq 2 ^ { alpha_1} cdots 2 ^ { alpha_r} = 2 ^ k $ or $ k = alpha_1 + cdots alpha_r $. Moreover, each of these terms is of the form
$$
int_T ^ {2T} gamma e ^ {it ( beta_1 log p_1 + cdots
beta_r log p_r)} dt $$

with $ | gamma | $ 1 and integers $ | beta_i | leq alpha_i $. He then claims that $ beta_1 log p_1 + cdots
beta_r log p_r gg x ^ {- k} $
and therefore, using this $ int e ^ {cit} = – frac {ie ^ {cit}} {c} + constant $ and that $ | gamma | $ 1 we get that
$$
int_T ^ {2T} gamma e ^ {it ( beta_1 log p_1 + cdots
beta_r log p_r)} dt ll x ^ k $$

so the sum actually contributes to the more $ mathcal {O} (2 ^ kx ^ k) $.
My question is: how can I go from $ mathcal {O} (2 ^ kx ^ k) $ at $ mathcal {O} (n) $?
I guess the link $ ( alpha_1 + 1) cdots ( alpha_r + 1) leq 2 ^ { alpha_1} cdots 2 ^ { alpha_r} = 2 ^ k $ could be improved. I do not know how to show the link
$$ beta_1 log p_1 + cdots
beta_r log p_r gg x ^ {- k} $$

maybe that can be improved too.
The only other limit used is $ | gamma | $ 1 or $ gamma $ is the product of form factors $ frac {1} {2 ^ { alpha_i}} { alpha_i choose ell} $. Using Stirling's approximation for the factorial that I've
$$
{ alpha_i choose ell} leq { alpha_i choose alpha_i / 2} sim frac { sqrt {2}} { sqrt { pi alpha_i}}
$$

therefore, this link is good.
Thanks a lot for your help!