This is not just SN16.9; it is the standard way the fourth jhanas are phrased.
I for one am of the opinion that the “deeper” jhanas where there are no experiences of the body, are what the Buddha practiced. In my understanding, in jhanas 1, 2 and 3 there is no pain, either physical or mental, there is only piti and/or sukha. And indeed the first three jhanas of course don’t mention the presence of pain.
At a time when a noble disciple enters and dwells in the rapture of seclusion, five things aren’t present in him. The pain and sadness connected with sensual pleasures. The pleasure and happiness connected with sensual pleasures.(AN5.176)
That is to say, physical (or “sensual”) pleasure and pain were already abandoned in the first jhana, which is the rapture (pīti) of seclusion—meaning seclusion from the five senses.
So what’s happening with the fourth jhana formula “with the giving up of pleasure and pain”? It’s a good question.
It helps if you look at this phrase a bit less technically, not as two different factors that are abandoned, but more as a description of what the fourth jhana is like. It refers to the whole gamut of both pleasure (sukha) and displeasure (dukkha), which together are abandoned. When sukha of the third jhana fades away, the whole pain-pleasure “faculty”, in a sense, is left behind. This idea is repeated in various ways, first by saying “pleasure and displeasure are abandoned”, then by saying “happiness and sadness are ended”, and once more by saying that the fourth jhana is adukkha-asukkha, “without pleasure or pain”. All these are different ways to emphasize that the fourth jhana is a neutral experience, as Ven. Sabbamitta also said.
In short, because sukha is abandoned by going into the fourth jhana, and dukkha isn’t there either, you go beyond all pleasure and pain.
It’s like a coin with two sides; in the first three jhanas you only look at one side (the sukha), having turned away the dukkha side. In the fourth jhana you throw the whole coin away, so you discard both sukha and dukkha.
Does that make sense? At least intellectually?
If not, Ajahn Brahmali explained it in a workshop we gave last year, but I can’t remember exactly which session it was, so you’ll have to search around bit.
https://bswa.org/teaching/sammasamadhi-right-stillness-workshops-2022/. Probably session 5 or 6 if I recall.
I recently gave a talk where I very briefly addressed this as well, somewhere near the end:
Hope that helps.