*
The simplest way is when (on average) only those of above-average intelligence are able to raise children to sexual maturity.
*
The assumption is that (in pre-industrial society) almost everybody has above-replacement fertility (averaging significantly more than two children per women) but a situation in which people of lower intelligence almost-never raise any children to adulthood because almost-all children die before reaching sexual maturity.
*
This was, in fact, probably the situation that prevailed in Medieval Britain, and probably Western Europe generally, and probably pre-modern China and East Asia, and among Ashkenazi Jews in the Middle Ages.
*
You can think of this as a bottom-threshold, or as (barring rare flukes) a minimum intelligence level for rearing children to adulthood...
And this minimum intelligence necessary to rear children to adulthood being at above average intelligence - and this situation prevailing as a selection environment for long enough to raise the average level.
Of course, what will most likely happen is that as intelligence declines, there is a sharply-declining-probability of raising children to adulthood - a probability which reaches near-zero at somewhere around average intelligence for that group.
*
The point is that there is not much need for evolving genes associated with higher intelligence, rather the mechanisms is mostly one of a selecting-out of genes associated with low intelligence.
These selected-out genes may have other, not-intelligence-related advantages, which would, of course, be lost.
Possible/ plausible examples of selected-out genes (from surveying the higher intelligence populations) are genes for athleticism (e.g. genes associated with better running, jumping, one-on-one unarmed combat).
*
And of course this selection process for higher intelligence pretty-much ceased to operate in developed countries from about 1800-1850 - when childhood mortality rates began to plummet towards zero among the least intelligent; and selection became (more or less) for 'pure fertility' - so that any genes associated with any behavioural cause of maintained/ increased fertility (including genes which damage biological functions, and render someone unable/ unwilling to use fertility controlling technologies) would be, have been, amplified in this post-industrial modern population.
*