Remember that triggering the traps spends energy. In nutrient poor environments it becomes hard for the plant to reform the ATP needed for trap closure once it is spent. There is a premium on phosphorous which is not much present in the growing medium, nor should it be. This is usually made up from prey capture, but if the plants don't get a lot of food this is a problem.
if it has flowered twice it is highly probably your plant is exhausted.
If any more flower scapes come up, cut them off before they get to large. Flowering takes a LOT of energy for a flytrap, and their growth usually stagnates after the flower has come up, some even stall for the rest of the season, putting out so little growth that most people clip the flowers to maintain growth, after all, we all grow them for the traps, not the flowers.
If you have any superthrive, adding a solution of 1 drop per gallon to the saucer may help it perk up, of course, catching some pray might help to. Don't feed it to much though, it may not be able to handle it in this state. And don't overdose on superthrive.