> Back in the day as much as about 40%...
40% sounds too high -- I think 18% at max is more realistic. Apple's A chip cost was estimated between $12-$20 or about 7%-8% of total BOM. Aside from Apple's A chips fabbed by Samsung and baseband/RF/sensors by Qualcomm/Skyworks, I can't think of any other significant US components in Apple's mobile product. The most valuable components in the iPhones in those days were DRAM/NAND flash storage (about 30% of BOM) and displays and they came from either Japan or South Korea. Micron wasn't an significant supplier until Apple's relationship with Samsung soured.
Sure, who can forget Tim Apple's rare CBS interview where he proudly declared the engines of their portable devices were made in the US, after which Apple promptly outsourced it to TSMC in Taiwan. I suspect that that was a calculated move to make the final defense of their outsourcing practices before moving that out of the US as well.
Nowadays the countries of origin are more diverse, and the proportion made in the USA has fallen. The biggest single change though was moving from US made Samsung CPUs to TSMC chips from Taiwan.
I believe some of the more sophisticated assembly and QA test equipment is US made, or at least used to be but can't find a reference for that online.
[0]https://www.lifewire.com/where-is-the-iphone-made-1999503