As you know, the zone of acceptable sharpness extents fore and aft of the point focused upon. This zone called depth-of-field expands as the subject distance increases. Contrariwise, this zone shrinks as you move in closer. Depth-of-field expands as the aperture (working diameter) of the lens is reduced. In other words, the smaller the lens diameter, the greater will be the depth-of-field.
The problem with phone cameras, they are made to be simplistic as operator input. As a result your control over aperture is scant. A workaround possibility is to affix a cover up mask over the lens. I suggest cutting out some disks of aluminum foil with a hole punch. You easily affix one over the lens using double stick cellophane tape.
Now a pin-hole can serve as a substitute for a lens. Surely you have heard about pin-hole cameras. An advantage of the pin-hole camera is, depth-of-field is limitless. Sounds good but there is a snag. The pin-hole system is substandard to the lens when it comes to image acuity. You can experiment piercing the aluminum foil with different size sewing needles. Such a scheme will work just fine because the lens is invalidated when overlaid by a pin-hole.
This will work but you must experiment to find the best pin-hole diameter for your needs. Too small and too much light will be blocked making photography impossible. Too small and twin demons of diffraction and interference degrade the image. Too big and the pin-hole becomes insufficient and is thus rendered moot.
Try this pin-hole gadgetry, it might work for you!