Primarily how the number of grooves, along with their dimensions and profiles, were established…
Well, for one point: They haven’t really been completely ‘established’, if by that you mean agreed upon.
We have 2 groove through 6 groove in significant use in various iterations of Benchrest, which can be considered the ultimate litmus for accuracy in shoulder-fired weapons.
Meanwhile, what I will call “numerous” groove barrels are in use with military weaponry, many of which use driving band projectiles, but the same thing is seen in the Marlin “Microgroove” tubes, to decent effect.
When considering the depth of grooves—or the height of the lands, if you prefer—the eventual projectile type is of crucial consideration. Paper patch barrels don’t follow the same requirements as a patched round ball barrel, for similar reasons that a brass or copper monolithic bullet may be better suited to a dedicated barrel than to use it in a conventional lead-core bullet tube.
And then there are the Medford, Whitworth/Polygonal/Schneider/Glock/etc., Ratchet, and many others that have seen significant-to-no success.
In much conversation with top-tier manufacturers, the common thread I hear is that UNIFORMITY of the twist rate and rifling profile, along with making every attempt to keep the bore straight, is more critical than dicing tomatoes over 4 vs 5R vs XYZ.
That’s not always the answer we types like to hear, but it might be the one we need.