Technological dystopia. Have all the advances you want, but also, figure out why they make life more difficult, and when they don't, remember that your enemies can have them, too. Generate the drama. New toys don't always make people happy. Maybe the photonic lifeforms revolt. Maybe improvements in sensor technology and an ability to move forces around easier (through better warp, better transporters) are leading to a police state. Even making people immortal using transporters or Khan's blood or whatever can lead to stagnation as older and older people desire to keep things familiar, and the rise of gangs and other ways of acting out for younger people who no longer have satisfying roles in life to move into because the older people almost never move out of them by dying, and overpopulation - which can lead to territorial wars.
"I never saw no 'miracle of science', that didn't go from a blessing to a curse" - Sting, "If I Ever Lose My Faith In You"