And I Ended Up Using Tape
Now I feel ridiculous. After spending time disassembling a HP HD 4310 webcam to see how to best modify it for mounting on the carriage of my retired 3D printer chassis... I realized the fastest and easiest way to test some ideas is to just tape the thing to the carriage with good old reliable blue painter's tape.
The tape would not be sturdy enough for precision measurements, of course, but that's not important on the first pass through. I needed to see if the camera can autofocus within the range I want, and I need to see the quality of images I can get with this camera. And most of all, I need to verify I could write the code necessary to control everything working together as a unit. None of that need a rigid mounting.
Right now the biggest problem is the USB cable exerting a force as the carriage moves around. It is a pretty soft cable, but strong enough to wiggle a taped-down camera. I suspect any kind of 3D printed bracket would be enough to resist the force exerted by the USB cable.
In the short term, this is not a huge problem. Tape on the left and right sides of the camera has good leverage to resist the cable as the carriage moves along the X axis, and Y-axis movements would not exert any force at all since it is an independent assembly.
So a little blue tape is all I need right now to let me get started on the coding.