The smaller the camera (and cheaper) the more issues you're going to have. Especially if you're looking at cheap chinese spy cams or something. No one makes a specific camera for "model trains suspended from a ceiling", so the closest you'll have is an action camera that's probably waterproof... so you'll always have features that you don't need but are paying for.
You could try these other camera's, not cheap, but may be a better size
Kodak PIXPRO SP360
RunCam 5 4K FPV Camera 1080P