Grounding branch circuits in gutter instead of in panel
The equipment grounding conductors can join together in the gutter...
The overall thrust of your plan, where you bring a bunch of branch circuits into a gutter then send their hots and neutrals to the panel via a short conduit nipple, falls under NEC 250.122(C):

(C) Multiple Circuits. Where a single equipment grounding
conductor is run with multiple circuits in the same raceway,
cable, or cable tray, it shall be sized for the largest overcurrent
device protecting conductors in the raceway, cable, or cable
tray. Equipment grounding conductors installed in cable trays
shall meet the minimum requirements of 392.10(B)(1)(c).

Since we're dealing with 120/240V branch circuits here, this requirement can trivially be met by using a metal nipple with double locknuts (one inside, one outside) at each end to join the gutter to the loadcenter.  Note that since the Wiegmann gutters/troughs do not ship with a grounding terminal bar fitted, you'll have to fit a UL467 listed one yourself.  If you have a drill/tap (or combination drilltap) in either 10-32 or 1/4-28 handy, you can drill &amp; tap a couple of appropriately spaced holes then fit a matching bar using suitable machine screws:

For the 10-32 case, you'll want to use an Ilsco NBAE series bar of the appropriate size with two mounting holes drilled 2.344&quot; apart and 10-32x1&quot; machine screws to mount the bar to the holes
For the 1/4-28 case, you'll want to use an Ilsco NBAS or Penn-Union NA-400 series bar instead, using 1/4-20x3/4&quot; screws (mounting hole spacing varies in this case)

However, not everyone is equipped to tap holes in sheet metal.  For those who aren't, an alternative is to use an Ilsco NBAE series bar, but mount it using 10-32x1&quot; thread forming screws (Fastite™ or equivalent type) into #21 pilot holes in the gutter drilled on the same spacing as above.
...but that doesn't extend to the grounding electrode conductor
However, since you have a legacy 3-wire feeder to the outbuilding in question, you must land the grounding electrode conductor on the bonded neutral bar of the outbuilding's subpanel.  This is by analogy to a service entrance or separately derived system, since both those points have bonds present and both situations require that the GEC be connected to the neutral (grounded conductor), not to an equipment grounding bar or point.  Furthermore, trying to land the GEC in the gutter would most likely violate NEC 250.121, which prohibits the GEC and EGC from sharing the same conductor/wire except under a few select circumstances (which you are not going to run into here).