I had been unable to copy pictures to my computers from my smartphone since updating from my old iPhone 6 Plus to the iPhone 8 Plus. It was 6 months of infuriating nonsense. I'm documenting what I found as I wasn't able to find any information on what ultimately resolved my issue. I hope this helps someone.
I was unable to import photos on my primary Windows 10 laptop using Explorer to copy the photos or image files to my local computer (see figure 1). I was also unable to use the Photos app to import my photos and videos. The Disk IO was extremely low (see figure 2) and copied the files extremely slow until reporting "A device attached to the system is not functioning". The copy would fail. I also had similar results using my old June 2009 MacBook Pro. I tried multiple Lightning USB cables, all to no avail.
While pouring over every setting I could find, I found Settings > Photos > Transfer to Mac or PC and changed it from Automatic to Keep Originals (see figure 4 below). Once I reconnected my iPhone to my computer, my transfers were over 5 times faster (see figure 5) and completed without issue.