The following doubtlessly naive heuristic suggests to me that there might be some generalizations. I don't know whether, at one extreme, the story is classical, or at the other extreme, the heuristic just fails.

Consider a generic hypersurface $S$ of degree $d$ in ${\Bbb P}^n$. The intersection of $S$ with a generic plane $P$ should form a curve of degree $d$, hence a curve of genus $g=(d-1)(d-2)/2$.

The possible planes $P$ range over a Grassmannian ${\rm Gr}(n+1,3)$ of dimension $3(n-2)$.

One thus gets a morphism from ${\rm Gr}(n+1,3)$ to the moduli space of curves of genus $g$, which has dimension $3(d-1)(d-2)/2 - 3$ (unless $d=3$).

If the numbers work out right, one can try to make $n$ large enough, but not too large, so that one gets a 0-dimensional set of planes where the intersection gives rise to curves with some desired amount of degeneration. With enough degeneration perhaps, the original curves of genus $g$ will acquire components of smaller genus. So one might get interesting configurations of comparatively low genus curves (not necessarily all of the same genus). For example, with $S$ of degree $4$ one might look for a configuration of genus 1 and 2 curves. (Personally, I don't know enough about compactifying moduli spaces even to guess the details at this point.)

In any case, with the 27-lines on the cubic surface, elliptic curves would seem to degenerate into a finite set of lines sharing common points, making this classic object an example of the heuristic above.

All that said, I'll make my question the broad one in the title.