Yes, the choice of primaries affects color reproduction, and in particular the choice of gamut mapping method (when mapping from one space, like ProPhoto, to another space, like a display, or printer, or sRGB) affects color reproduction.
But aside from quantization error, the choice of gamma encoding (1.8, 2.2, sRGB, 1.0, etc.) has no impact on the color reproduction capabilities. In fact, conceptually the first thing that happens in an ICC-based workflow is the transformation from the RGB encoding space back to the Profile Connection Space (a.k.a., PCS, usually D50-relative XYZ or CIE L*a*b*) before conversion/mapping to the desired output space. So the encoding is basically irrelevant as long as you can get safely back to the PCS.