  We study the viability conditions for the absence of ghost, gradient and
tachyonic instabilities, in scalar-torsion $f(T,\phi)$ gravity theories in
presence of a general barotropic perfect fluid. To describe the matter sector,
we use the Sorkin-Schutz action and, then, we calculate the second order action
for scalar perturbations. For the study of ghost and gradient instabilities, we
have shown that the gravity sector keeps decoupled from the matter sector,
applying in this way the viability conditions for each one separately.
Particularly, we verified that this theory is free from ghost and gradient
instabilities, obtaining the standard results for matter, and for the gravity
sector we checked that the speed of propagation satisfies $c_{s,g}^2=1$. On the
other hand, in the case of tachyonic instability, we obtained the general
expressions for the mass eigenvalues and then we evaluated them in the scaling
matter fixed points of a concrete model of dark energy. Thus, we found a space
of parameters where it is possible to have a stable configuration respecting
the constraints from CMB measurements and the BBN constraints for early dark
energy. Finally, we have numerically corroborated these results by solving the
cosmological equations for a realistic cosmological evolution with phase space
trajectories undergoing scaling matter regimes, and then showing that the
system present a stable configuration throughout cosmic evolution.
