Does it have to be RGB? Could you not use Bruce Lindbloom Up Lab?
It has to be RGB when you apply an "RGB curve", that is apply the same contrast curve separately on the R, G and B channels.
That "tone operator" has special look properties. It shifts saturated hues as it won't scale R G and B with the same amount. For example if you have R at 60%, green at 40% and blue at 80% before the S-curve, you will get a lower G value, a higher R value and a somewhat higher B value, a new channel mix which results in a more purple hue than the original. This effect can be exaggerated depending on how the colorspace is configured, as demonstrated in the crops above.
Hue shifts is not the big thing though, what it also does is that it separates the channels more, ie introduces a saturation increase. As we know in human visual perception contrast and saturation is connected, so if you increase contrast also saturation must be increased otherwise the result looks desaturated. That is the super-simple RGB curve does the basics of what any tone operator should do, and in the early days of digital photo editing RGB curve was the thing so it's a look we've got used to. It also have the nice property of super-robust clipping as it rolls off each channel separately. It does mean that bright reds become orange before clipping etc, but it becomes a really smooth transition.
An RGB curve does over-saturate things though, but as many prefer an over-saturated look it's not always seen as a problem. However by combining it with a luminance curve for the shadow dip you can soften the hue shift and over-saturation effects and get a more neutral curve.
When Adobe made the DCP they came up with their own RGB curve variant. The basically do the same thing regarding saturation increase, but correct the HSV-Hue so it stays the same, ie no hue shift (within the limits of the perceptual accuracy of HSV-Hue which is pretty good but not 100% perfect). I'm guessing a bit here but it seems their early attempts of profiles is simply to make a colorimetric base profile shooting some target and slapping on this curve. It makes an okay profile with no/little hue shift problems, but it's certainly not a full take on how to render color. That ACR curve results in grayish blue skies for example, as mathematically keeping the HSV-Hue correct only allows for strong desaturation to clipping. A pure RGB curve will instead twist the hue towards cyan of those skies and keep more saturation.
UP Lab, similar to Lab2000HL, is a good color space for gamut compression as you can scale chroma (saturation) without shifting hues or changing lightness. CIECAM02 JCh is quite good at that too. However applying a curve in that space it would mean to apply it to the L channel, the lightness channel. This works with the same principle as a "luminance curve" that is the end result is that you scale R G and B with an equal amount, which means no hue shift and no saturation change. This is a different tone operator than an RGB curve, with different properties. If you don't want hue shift, you get that. It has a problem though, and that is that it doesn't modify saturation. Intuitively that might seem as a good thing, but as human color perception has contrast and saturation connected increased contrast with kept saturation with perceptually be perceived as increased contrast with reduced saturation.
Unfortunately it's not as easy to just add some saturation to the luminance curve and you're fine, as the perception is not really linear. This is what all the work put into DCamProf's neutral tone reproduction operator is about.
If you ask me one of the few
simple tone operators that has decent performance and look is the RGB-Luminance combination variant. I'm sure there are fans of the RGB and ACR curves too though.