The problem with all cell phone cameras is that you have no control over them. Everything is automatic. You can't adjust aperture, shutter speed, or focus. Plus, you should be shooting in Landscape mode for model train images. Model train scenes are typically strong horizontal images. If you want photos with tremendous depth of field, you will have to use your DSLR and add a little software magic.
Take a look at this photo:
This is from Bill Bramlage's Tower City book. Bill took all the photos in this book. As you can see, everything in this image is sharply focused! The people in the foreground are about 8 inches from the camera, while the buildings in the background are more than 8 FEET from the camera.
Bill shot this image using a Nikon DSLR and a technique called "focus stacking." He uses a program called "Zerene Stacker" to achieve these results.
Basically this is how you do it.
First, shoot a shot with the foreground in focus. Obviously the background is soft.
Now adjust the lens to bring the background into focus, and take another shot.
Here's the end result, with the multiple images "stacked" into a single image with everything in focus.
Some of the images in Bill's book required 20 or more images, each one with a different point of focus. When the images are combined in Zerene Stacker, the program automatically blends them into a final, fully focused image.
A DSLR is a necessity for doing this level of photo work, as is a TRIPOD or some form of stable camera mount. You must be able to take multiple images of a scenes without the camera moving, and you must be able to adjust the focus to different distances from the lens.
Here's another example from Bill's Tower City Book.
The track in the foreground is 4 inches from the camera, while the buildings in the background are almost TWENTY FEET from the camera, and everything is in focus.
It sounds like a lot of work, but it really is not. The results can be breathtaking!