I've always held the understanding that sex serves the purpose of giving humans an outlet to express intimacy (obviously within marriage because being intimate with a variety of people is an obvious way to drive yourself insane) and this intimacy gives rise to children thus continuing our existence as a species. But when women go beyond child bearing years or one of the partners is sterile they can still have sex as an intimacy outlet.
.
This is essentially correct. Marriage and the marital act have multiple ends. Secondary ends of each include mutual bonding and the satisfaction of concupiscence. As
Casti Conubii states, these ends are lawful to pursue so long as they are pursued naturally (i.e., without contraceptive intervention), and therefore duly ordered to the primary end of procreation (Denz. 2241).
.
There are a variety of different sources one can use to prove the point. The Code of Canon Law enumerates a many different impediments to marriage, but does not regard marriage between sterile persons as invalid or unlawful (marriage between
impotent persons is, however, invalid; this is because in such an arrangement there is an actual inability to copulate, not merely a natural defect to conceive).
Casti Conubii also describes such relations as lawful (see Denzinger citation above). Theologians since the 1850s have occupied themselves with questions of marital relations during sterile periods ever since periodic continence became known to man, and they have all affirmed its morality, including multiple decisions of the Holy Office dating back to before Vatican I. Prior to the 1850s or so it's more difficult to find detailed theological treatises on the morality of sterile relations simply because the biology behind conception was not yet particularly well understood, but since then there is a plethora of material. You might look up the work of Griese, Wayne, and especially Vermeersch (who drafted Pope Pius XI's
Casti Conubii) if you'd like even more information.