Hi I nearly always have my cameras set on aperture priority to manage what you have shown above. I shoot a lot of street so I tend to set up focus using hyperfocal distance (either marked on the lens or by using my telephone app.
Other things I have done are focus stacking, which is now coming into mobile phones, where multiple shots are blended to give front to back sharpness.
I also like to do bokeh panoramas, where I stitch together multiple overlapping shots at wide aperture to simulate a wide angle lens with narrow depth of field. Sometimes known as the Brenizer Method.
RE: Photography How To: The Exposure Triangle: Part 1: Aperture