Is all this stuff entirely machines nowadays, or do people do it by hand still?
I remember documentaries from the 90s/00s showing Chinese factories with people hand soldering stuff onto PCBs, but most components used in electronics seems way too small for that.
The assembly is almost all automated with pick and places machines and the board fabrication is mostly chemistry. The problem is changing tooling between each run: PNPs need their feeders changed to the right parts for each board and there’s limited space for them so they all have to be changed for every design that runs through. Same with the tooling for the board etching. This stuff is precision equipment and has to be properly aligned so it’s not just a simple matter of plugging and unplugging some parts.
There is actually still quite a bit of hand work done. For standard surface mount designs it's mostly all automated, but there is still a good amount of through hole out there.
Through hole can be automated, but it doesn't really make sense until you have pretty good volume. So that leaves it still mostly to hand.
Then there are also all the unique customizations, like non-standard mounting specs or running jumper wires.
It's not (just) about cheap labor. The sheer density of resources and knowledge in Shenzhen is just insane.
Manufacturing at small to medium scales is so heavily determined by small blockers/latencies. Missing some component, or need a modified PCB? In the US or Europe you'd be happy to find a replacement within a week, or more likely have to wait a month for it to come from China. In Shenzhen you can probably walk 2km and pick it up yourself in under an hour.
Aseembly is mostly done by machines now, even for low volume its generally done by a pick and place machine setup. But depending on your product, things like thick power terminals may still be hand soldered as not every manufacturer/equipment can handle these.
Depends what you're doing. Most smaller surface-mount components and these days even a lot of standardized through-hole components can be assembled via pick and place machines and reflow ovens, which are largely automated. Larger components may require some extra steps like a small blob of glue to fix them in place - this comes up a lot for edge connectors, switches, or other larger mechanical components where the weight distribution doesn't allow them to rest flat on the board during reflow. Larger through-hole devices might need assistance with initial insertion or may be paired to other mechanical interfaces like a heatsink which requires some manual interaction. In some cases (particularly for boards with through-hole components all on one side) the soldering step can be automated by wave soldering. There's still some constraints on what can be automated, but it's all a lot less manual than the 90s/00s.
Some components, particularly transformers, might also be constructed by hand for custom/complex structures. That's component assembly rather than board assembly, but it's a consistent source of manual labor involvement in the supply chain.
Design for manufacturability is one of the important goals being considered in any PCB design. High-volume or low-cost boards will optimize for automated assembly and find ways to substitute or eliminate components with higher assembly costs. Extremely high-volume boards like in smartphones can justify custom tooling if it helps automate assembly.