For all of my model railroad photography, I've been using my smartphone exclusively for about five years. I rarely break out my Nikon DSLR any longer.
I understand that at least part of my "givens and druthers" for the "perfect" model railroad camera are due to my model railroad endeavors being only in 1/160th scale, not 1/4" scale as is Bernie's
@AlkemScaleModels fabulous Civil War layout, which shows that "perfect" is not an absolute, but dependent on different needs and/or desires of the individual.
There are two main problems with model railroad photography (1) - Depth of Field (DOF) and (2) - Camera Lens Position. Since the small scale of N-scale magnifies both of these problems, IMO maybe there's a different solution than a full-sized DSLR, and here is a further discussion of my preference.
Although my Nikon DSLR takes marvelously sharp photos and I can mount whatever lens I need on it for either panoramic or close-up photos, I am not enlarging any of my photos to billboard size, nor do I print hardly any of them for framing and display on my wall...or anywhere else. I look at them on my computer monitor if I want/need to closely examine them, but most of the time I'm looking at them on my smartphone's screen, or sending them to friends/customers to illustrate various aspects of model railroading.
So, I don't "need" my DSLR any longer to take model railroad photos, because my Android smartphone fulfills ALL of my model railroad photo needs, with the addition of a couple of apps (programs).
Like
@peteski , to control my photography's DOF, I've been using Helicon Focus for over a decade to achieve basically infinite DOF for my stationary model railroad photo compositions.
Since focus stacking requires several (or many) photos taken from exactly the same position, the same exposure, the same zoom setting but allowing manipulation of where the camera's lens is focused without moving the camera or accidentally changing position, exposure or zoom while taking multiple photos, being able to securely immobilize the camera, while allowing access to its controls is absolutely necessary. This is easier to do with a DSLR using a sturdy tripod and a remote camera release, with the lens sticking out there making it easy to manipulate the focus mechanism.
However, using a smart phone is a bit more difficult since touching the phone is necessary to fiddle with exposure, zoom and focus settings, when there's no tripod mount on any smartphone body that I am aware of, although several work-arounds are available, but are usually fairly rudimentary and cumbersome to use.
So, what to do?? The quality of smartphone photos is plenty good for viewing on a computer monitor or big-screen TV nowadays, or even for making medium size enlargements for framing and display...but immobilizing your smartphone is not easy to do, especially allowing access to the touch screen to alter your focus points in multiple photos.
The solution is a smartphone app that allows extremely quick, multiple exposures that also allows setting intermediate focus distances between chosen "near" and "far" starting and ending focus points. Since a smartphone's shutter is electronic, ultra fast multiple photos are possible meaning hand-holding your smartphone should be possible since the app is choosing "near" and "far" starting and ending focus points, and you've been able to set the number of intermediate focus points, which the app then automatically and very quickly chooses and exposes.
The app that meets all of these requirements (and many more) is called "Open Camera" and is available only for Android OS phones unfortunately. There may be focus-stacking apps available for iOS phones, but I don't know since my phone is an Android OS, which I chose specifically so that I could use Open Camera to facilitate post-camera focus stacking.
Smartphones, because of their small size (compared to even the smallest DSLR), allow many more photo opportunities than a DSLR, and Open Camera on your Android phone makes it very easy to compose and quickly expose your shot, without having to set up, position, attach your phone, to a small tripod.
Are some smartphones more suitable for model railroad photography than others?? Yes. For myself, the first thing is to only consider Android OS smartphones. The second thing is to ensure that the center of the standard lens (usually called the "wide" lens) on your smartphone is as close to an N-scale 6' from the phone's edge as possible, or less. This means that you can quite easily take model railroad photos from close to where an N-scale human would hold a camera at trackside.
6' in N-scale is 0.450" (11.43mm).
Smartphones with their main camera lens closer to the center of their phone body, even though their cameras may be excellent, won't be as good for model railroad photography as a smartphone with its main camera lens much closer to the edge of the phone.
The Android OS smartphone with the very best-rated still-camera, with the standard (wide) rear-facing camera lens center just about correctly positioned near the edge of the phone body (I don't have one in my possession to measure), is the Google Pixel 9 Pro XL...and will be what I buy to replace my old 2017 Pixel 2 XL (which I love, but the battery is dying). The Google Pixel 9 Pro is slightly smaller, but has the same cameras, and would also be an excellent model railroad camera at a lower price.
Focus stacking is not perfect, and will often generate artifacts when combining multiple photographs. However, in most instances, these artifacts can be minimized or eliminated, and I am 100% happy with Helicon Focus Pro...which I bought before they introduced their subscription service.
Here are some photos taken with my smartphone, the Open Camera app, using Helicon Focus Pro to put the photos together...
Photo (1) - Near-focus start photo taken using the Open Camera app in my smartphone. Note this nearest photo is focused on the woodgrain of the display board:
Photo (2) - Far-focus end photo taken using the Open Camera app in my smartphone. Note this most distant photo is focused slightly further than the rear of the caboose:
I chose (if I remember correctly) seven equal focus points between the near-focus and far-focus points. Total exposure time was less than a quarter of a second for all 9 photos...totally hand-held.
Photo (3) - All 9 photos stacked, everything in focus, out-of-focus blur completely removed, zero artifacts...all processed on my desktop with Helicon Focus Pro:
Photo (4) - Another focus-stacked photo that's been stacked with Helicon Focus Pro, then shopped with Photoshop. Frankly, this photo could not have been accomplished without focus-stacking:
In the previous photo at Echo Curve, the position of the smartphone camera lens made the low angle possible. I would have had to turn my DSLR upside down to even distantly approach that same low angle, or mounted the camera on my tripod and used my 18mm/200mm zoom to get "close" enough to the subject matter.
Another big advantage of Helicon Focus is to control what is in focus and what is out of focus. It's not always wanted to have infinite focus in a photo. Sometimes you might want to isolate the subject by making the more distant objects in the photo really blurry and out of focus. This is easily accomplished with Helicon Focus (and maybe other apps) simply by not including the distant photos that are in-focus into the stack you're combining.
Photo (5) - Focus manipulation emphasizing the main subject by not including the distant in-focus photos into the stack allowing more distant objects to remain out-of-focus:
Photo (6) - A panoramic photo of Echo with the total length being over 9 feet taken with my Google Pixel 2 XL with Open Camera, combined with Helicon Focus and shopped with Photoshop:
In my years of being a professional photographer, taking close-ups of my model work, winning the 1994 Model Railroader photo contest, having model railroad photos published in various model railroading magazines over the years...I am using my DSLR less and less. Frankly, I rarely use it for model railroad photography any more, and, in my opinion, the "perfect" camera for model railroad photography is the Google Pixel 9 Pro, or the slightly larger Google Pixel 9 Pro XL, either loaded with the Open Camera app, files stacked in Helicon Focus Pro.
Cheerio!
Bob Gilmore