A few answers to some questions.
1) Generally in-camera focus stacking doesn't work well when the magnification goes beyond ~ 2X, it's better to move the camera/lens and/or subject. Perspective issues become a problem. Check out PM for more details.
2) Often special lens are used in stacking other than the standard camera "macro lens". Reversed lenses, stacked lenses, inspection lenses, microscope lenses, reproduction lenses, and bellows lenses for example. See PM for more details.
3) Special telecentric lenses, or near telecentric, are often used for serious Stack and Stitch (S&S) work. S&S is like a macro panaorama where multiple focus stacks are stitched together to render a much larger image. We've done 29000 by 23000 pixels chip images, and soon much larger!!
4) Lighting becomes more difficult as the magnification increases. Many use flash/strobes to help with vibration issues. Highly diffused light is generally required, many times with multiple layers of diffusion.
Anyway, lots of things to deal with, the mentioned PM site is devoted to macro imaging and a great resource.
https://www.photomacrography.net/index.htmHere's a very low res (original is ~40MB JPEG) chip image example. It's a Direct Digital to Antenna (DD2A) chip (patent 7903016) from long ago, process was IBM Silicon Germanium 9HP 90nm BiCMOS.
Best,