Use a small aperture for greater depth of field. For focus stacking, take multiple shots at different focus points and blend them in post-processing to achieve sharpness throughout the product.