Modelica can absolutely be used for this, but there may not be a readily-available model created already. A generic stepper motor model is available here:
Operationalizing this into a Modelica model is pretty straightforward. Did not look for a driver model, but a driver model would be a lot more important in modern times. I am guessing that not many people would simulate this fidelity of stepping dynamics as a "first cut", and anyone who does is likely to also have a detailed driver model. Demand for this model in a standard library is likely quite small.
You could use it to model a CNC machine, but you'd probably need to make new components. It would also be difficult to model the changing load as the spinning tool plunges into metal, but you could model dynamic deformation and response of the machine given the loads. It is difficult to model changing 3D contacts in modelica, although a new approach to solving newton's equations, dialectic mechanics may fix this problem
NEMA isn't a type of motor, it's a connection standard used for motors. You might be able to model stepper motors with some of the components in the modelica standard library for magnetic modeling.
Modelica by Example is a textbook on Modelica, not a searchable index of models. It doesn't even cover the Modelica Standard Library in any details much less the many other Modelica libraries out there. To determine if something has been done in Modelica your best bet is to Google about it. All the proceedings from all Modelica conferences are available free online and open to be crawled by any search engine. That's where you'll find what has really been done.
https://doc.modelica.org/Modelica%204.0.0/Resources/helpDymo...
Are NEMA motors modeled? Could one use this to simulate/model a CNC machine?
EDIT:
Apparently not, given that "NEMA" doesn't show up searching:
https://mbe.modelica.university/