  We prove a version of the Erd\H{o}s--Beck Theorem from discrete geometry for
fractal sets in all dimensions. More precisely, let $X\subset \mathbb{R}^n$
Borel and $k \in [0, n-1]$ be an integer. Let $\dim (X \setminus H) = \dim X$
for every $k$-dimensional hyperplane $H \in \mathcal{A}(n,k)$, and let
$\mathcal L(X)$ be the set of lines that contain at least two distinct points
of $X$. Then, a recent result of Ren shows
  $$ \dim \mathcal{L}(X) \geq \min \{2 \dim X, 2k\}.
  $$
  If we instead have that $X$ is not a subset of any $k$-plane, and
  $$
  0<\inf_{H \in \mathcal{A}(n,k)} \dim (X \setminus H) = t < \dim X,
  $$
  we instead obtain the bound
  $$ \dim \mathcal{L}(X) \geq \dim X + t.
  $$ We then strengthen this lower bound by introducing the notion of the
"trapping number" of a set, $T(X)$, and obtain \[ \dim \mathcal L(X) \geq
\max\{\dim X + t, \min\{2\dim X, 2(T(X)-1)\}\}, \] as consequence of our main
result and of Ren's result in $\mathbb{R}^n$. Finally, we introduce a
conjectured equality for the dimension of the line set $\mathcal{L}(X)$, which
would in particular imply our results if proven to be true.
