Does wheel circumference matter, i.e. smaller diameter wheels, as opposed to larger diameter wheels, as a contributing factor to wheel grip?
Only to the extent that it influences the Coefficient of Static Friction.
The Coefficient of STATIC friction is used because, at the instant of contact, there is no relative motion between the tire and rail (unless, as you say, the wheel is slipping).
[en.wikipedia.org]
This example (generically, a cylinder rolling on a surface) is a classic "teaching moment" in Statics. It takes a bit of mind-alteration to grasp that, at the instant of analysis, the wheel is NOT rotating around the axle - the entire wheel is rotating around the contact point as if it were pinned (hinged) there. (Of course, an instant later, it's rotating around another contact point.) That's the only way to accurately determine the Normal Force and the Coefficient of Static Friction.
As Einstein said, everything's relative.
JAC