Upekkha’s perception of deva lokas as ‘shining traps’ may be justified when it refers of anariya devas there. Upekkha also sees that the case is different for those devas with magga phala. But the pleasures to be had there and the attainment of Nibbana going together is not excluded; indeed, they do go together, or probably the first is followed by the second – and this as a result of the merits the sutta is talking about. Just to substantiate this there is this verse in the Nidhikanda Sutta (Kp 8)-
(It is talking about the REAL savings of dana, sila etc which follow one after death, not the worldly ones which do not but which people value so highly):
Human good fortune,
delight in the world of the gods,
even the ATTAINMENT of Emancipation,
through this merit they receive all.
Mānussikā ca sampatti,
devaloke ca yā rati;
Yā ca nibbānasampatti,
I am not able to tell whether the ‘attainment of emancipation’ will follow ‘the delight in the world of the gods’ in the same deva realm or later , but going by the sequence of the verses (first the human, then the deva loka and thirdly Nibbana mentioned) it would appear the three happen sequentially.
The whole sutta is beautiful, and serves to show the stupidity of holding onto material things.