This is basic math. It's interesting that someone else claimed it's "physics" as a retort, when yes indeed it IS physics. It's why you can make a tiny lens fixed focus camera that seems to have everything in focus, from near to far, because the DoF becomes enormous.
You have a 4mm lens at f/2. To get the same depth of field you'd need a 50mm lens at f/25, not f/512.
You don't need to use a 50mm lens though. Macro lenses are typically 24mm or so. So you need to shoot at F12 to have the same depth of field in reality, certainly not f/512...
And my camera actually moves the sensor AND the lens instead of just the lens. Because of that it can stabilize in the near field MUCH more efficiently than an iPhone ever could.
Humorously years back I had authored a giant depth of field essay with online calculators specifically because so many people just couldn't understand why their iPhone couldn't get bokeh. Yes, f/512 would be the impossible equivalent. This is easily calculated.
Regardless, the lens Apple uses for macro mode has a 1.54mm focal length. The 4mm example was just demonstrating how fundamentally small cameras win on depth of field, at least if you want maximal depth of field. Conversely they lose when you want to limit depth of field, which is why we have computational bokeh.
"Macro lenses are typically 24mm or so."
The smallest from most makers is 35mm, but the majority are 50mm+.
This conversation has turned weird. As someone who has had many SLRs, and many lenses, and has taken thousands of macro photos, I know that in the real world macro photography is a massive pain. That DoF is by far the number one obstacle (which is why focus stacking is simply necessary, often with ten or more varied focuses). Physics benefits small camera systems for that specific scenario.
It's a fixed issue.
I don't think that is the demonstration you think it is. Most macro photographers would not rack that up as a successful photo.
And again, focus stacking is what everyone does to compensate for the DoF weakness.
However, at 90mm the object would also be farther away, so you wouldn't need to stop down a lot more than you'd expect.