  We study the viability conditions for the absence of ghost, gradient and
tachyonic instabilities, in scalar-torsion $f(T,\phi)$ gravity theories in the
presence of a general barotropic perfect fluid. To describe the matter sector,
we use the Sorkin-Schutz action and then calculate the second order action for
scalar perturbations. For the study of ghost and gradient instabilities, we
found that the gravity sector keeps decoupled from the matter sector and then
applied 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 corresponding 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 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 the 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 presents a stable configuration throughout cosmic evolution.
