  Let $A$ be an abelian variety over a number field $F$ and let $p$ be a prime.
Cohen-Lenstra-Delaunay-style heuristics predict that the Tate-Shafarevich group
of $A_s$ should contain an element of order $p$ for a positive proportion of
quadratic twists $A_s$ of $A$. We give a general method to prove instances of
this conjecture by exploiting independent isogenies of $A$. For each prime $p$,
there is a large class of elliptic curves for which our method shows that a
positive proportion of quadratic twists have nontrivial $p$-torsion in their
Tate-Shafarevich groups. In particular, when the modular curve $X_0(3p)$ has
infinitely many $F$-rational points the method applies to ``most'' elliptic
curves $E$ having a cyclic $3p$-isogeny. It also applies in certain cases when
$X_0(3p)$ has only finitely many points. For example, we find an elliptic curve
over $\mathbb{Q}$ for which a positive proportion of quadratic twists have an
element of order $5$ in their Tate-Shafarevich groups.
  The method applies to abelian varieties of arbitrary dimension, at least in
principle. As a proof of concept, we give, for each prime $p \equiv 1 \pmod 9$,
examples of CM abelian threefolds with a positive proportion of quadratic
twists having elements of order $p$ in their Tate-Shafarevich groups.
