Specific to the image itself, there are two photographic technologies that can produce the high resolution, nearly grain-free images you need for a Stanhope type viewer in the original size (roughly like half an 8mm movie frame).
One is microfilm. Most microfilm stocks are designed to render extremely high resolution images at extreme contrast, but all or nearly all can also be processed in low-contrast developers (POTA, H&W Control, etc.) to give "pictorial" gray scale, while maintaining high sharpness and resolution. Complicating this is that you need a positive image: this can be obtained either by reversal processing the microfilm (develop, bleach the developed silver without removing the undeveloped halide, fog and redevelop, fix only as insurance), or by exposing the microfilm with a negative image, in this application typically from a larger film negative.
The other is one of the oldest forms of photography: wet collodion. In this case, you could clean your glass (very thoroughly), then coat, sensitize, expose, develop, and fix before the collodion can completely dry. Even though this is 1850s to 1870s technology, collodion is capable of extremely high resolution. Given that it is blue-sensitive only, a collodion Stanhope would need to be exposed with a silver image negative using blue or UV light, but that's a minor consideration compared to the effort of developing your collodion technique to the point of being able to produce Stanhope size slides.
For obvious reasons, I'd recommend microfilm. Develop a means of cutting this film in the dark, or exposing multiple slides onto the film at once (so you can cut after processing), and you could produce Stanhope slides (in black and white) cheaply and in quantity. With some optical trickery, you could even make multiple images from the same negative in a single exposure, improving throughput.
The optics needed will most closely resemble a commercial microfilm camera -- just a macro setup, similar to a slide duplicator, with the correct ratio between subject and image size (ideally, using a lens optimized for the ratio you're using, hence suggestion of a microfilm camera, or the lens from one). A macro lens on a suitably modified conventional camera would be another option.