Some thoughts too long for a comment:
Let $X=Y+Z$ and $U=Y/(Y+Z)$.
The Jacobian for the transformation $(x, u) \mapsto (xu, x(1-u))$ is $\left|\det \begin{bmatrix} u & x \\ 1-u & -x \end{bmatrix}\right| = |x|$, so
$$f_{Y, Z}(y, z) \, dy \, dz
= f_{Y, Z}(xu, x(1-u)) \left|\det \frac{\partial(y, z)}{\partial(x, u)}\right| \, dx \, du
= |x|f_Y(xu) f_Z(x(1-u)) \, dx \, du,$$
where in the last step we have used the independence of $Y$ and $Z$ to factor the joint density.
If we suppose $Y$ and $Z$ are nonnegative random variables, then we have
$$f_{Y, Z}(y, z) \, dy \, dz = x f_Y(xu) f_Z(x(1-u)) \, dx \, du$$
where $(y, z) \in \mathbb{R}_{>0}^2$ and $(x, u) \in \mathbb{R} \times [0,1]$.
Thus, we need $f_Y$ and $f_Z$ to be such that $f_Y(xu) f_Z(x(1-u))$ can be written as $g(x) h(u)$. Passing to logarithms, this becomes
$$\log f_Y(xu) + \log f_Z(x(1-u)) = \log g(x) + \log h(u).$$
- If we impose that $\log f_Y(y) = -\lambda y + c$ and $\log f_Z(z) = -\mu z + c'$, we recover the constraint $\lambda=\mu$ and obtain $Y, Z \overset{i.i.d.}{\sim} \text{Exponential}(\lambda)$.
- With the more general form $\log f_Y(y) = -\lambda y + (\alpha-1) \log y + c$ and $\log f_Z(z) = - \mu z + (\beta - 1) \log z + c'$, we again have the constraint $\lambda=\mu$ and recover the more general case of $Y \sim \text{Gamma}(\alpha, \lambda)$ and $Z \sim \text{Gamma}(\beta, \lambda)$.