I would remove everything that is clearly superfluous, like overripe fruit and damaged / sick / excessively long branches immediately.
Every plant needs a balance between root mass and top growth, and if you see already that the existing roots are disproportionate (which I guess is the reason for repotting them), some pruning now can help, leaving the plant with less foliage that needs to be supplied with water and minerals via the roots. And as cruel as it sounds, I recommend removing fruit and flowers. Stressed plants often direct their energy into these, a bit like a “last ditch effort” before dying. I would not, however, do a severe pruning right now, that may be a bit too much injury and you need the leaves for photosynthesis. Wait until new growth shows that the plants are perking up, then gradually start “fixing”.
Not part of your question and it will depend on your location and planting plans, but you may want to be a bit careful with full sun for your freshly repotted weak plants, give them a bit to put out feeder roots in the new pot to ensure a good water supply. That’s doubly important if the plants were indoors at the store. Plants get sunburn, too.