When I synced my iPhone 7 Plus to my late 2009 recently restored iMac, only 400+ of the 1,000+ songs transferred over. I found this application online - iExplorer - and wonder if anyone has used it? It seems "legit" and "safe"... but I like to check here first at MobiTog before trying these types of things.
https://macroplant.com/iexplorer/tutorials/how-to-transfer-songs-from-iphone-into-itunes
https://macroplant.com/iexplorer/tutorials/how-to-transfer-songs-from-iphone-into-itunes