  We generalize and simplify the constructions of \cite{DR2014} and
\cite{Hsi2021} of an unbalanced triple product $p$-adic $L$-function
$\mathscr{L}_p^f(\boldsymbol{f},\boldsymbol{g},\boldsymbol{h})$ attached to a
triple $(\boldsymbol{f},\boldsymbol{g},\boldsymbol{h})$ of $p$-adic families of
modular forms, allowing more flexibility for the choice of $\boldsymbol{g}$ and
$\boldsymbol{h}$. Assuming that $\boldsymbol{g}$ and $\boldsymbol{h}$ are
families of theta series of infinite $p$-slope, we prove a factorization of (an
improvement of) $\mathscr{L}_p^f(\boldsymbol{f},\boldsymbol{g},\boldsymbol{h})$
in terms of two anticyclotomic $p$-adic $L$-functions. As a corollary, when
$\boldsymbol{f}$ specializes in weight $2$ to the newform attached to an
elliptic curve $E$ over $\mathbb{Q}$ with multiplicative reduction at $p$, we
relate certain Heegner points on $E$ to certain $p$-adic partial derivatives of
$\mathscr{L}_p^f(\boldsymbol{f},\boldsymbol{g},\boldsymbol{h})$ evaluated at
the critical triple of weights $(2,1,1)$.
