Let me give an elementary answer in the case of abelian exponent-$p$ extensions of $K$, where $K$ is a finite extension of $\mathbb{Q}_p$ containing a primitive $p$-th root $\zeta$ of $1$. This is the basic case, and Kummer theory suffices.

Such extensions correspond to sub-$\mathbb{F}_p$-spaces in $\overline{K^\times} = K^\times/K^{\times p}$ (thought of a vector space over $\mathbb{F}_p$; not to be confused with the multiplicative group of an algebraic closure of $K$).

It can be shown fairly easily that the unramified degree-$p$ extension of $K$ corresponds to the $\mathbb{F}_p$-line $\bar U_{pe_1}$, where $e_1$ is the ramification index of $K|\mathbb{Q}_p(\zeta)$ and $\bar U_{pe_1}$ is the image in $\bar K^\times$ of the group of units congruent to $1$ modulo the maximal ideal to the exponent $pe_1$. This is the "deepest line" in the filtration on $\bar K^\times$. See for example prop. 16 of arXiv:0711.3878.

An abelian extension $L|K$ of exponent $p$ is totally ramified if and only if the subspace $D$ which gives rise to $L$ (in the sense that $L=K(\root p\of D)$) does not contain the line $\bar U_{pe_1}$.

Now, if $L_1$ and $L_2$ are given by the sub-$\mathbb{F}_p$-spaces $D_1$ and $D_2$, then the compositum $L_1L_2$ is given by the subspace $D_1D_2$ (the subspace generated by the union of $D_1$ and $D_2$). Thus the compositum $L_1L_2$ is totally ramified if and only if $D_1D_2$ does not contain the deepest line $\bar U_{pe_1}$.

**Addendum.** A similar remark can be made when the base field $K$ is a finite extension of $\mathbb{F}_p((\pi))$. Abelian extensions $L|K$ of exponent $p$ correspond to sub-$\mathbb{F}_p$-spaces of $\overline{K^+}=K/\wp(K^+)$ (not to be confused with an algebraic closure of $K$), by Artin-Schreier theory. The unramified degree-$p$ extension corresponds to the image of $\mathfrak{o}$ in $\bar K$, which is an $\mathbb{F}_p$-line $\bar{\mathfrak o}$ (say).

Thus, the compositum of two totally ramified abelian extensions $L_i|K$ of exponent $p$ is totally ramified precisely when the subspace $D_1+D_2$ does not contain the line $\bar{\mathfrak o}$, where $D_i$ is the subspace giving rise to $L_i$ in the sense that $L_i=K(\wp^{-1}(D_i))$. See Parts 5 and 6 of arXiv:0909.2541.