Maybe phones should provide a "charge only" setting that can be toggled on when using non-trusted devices to charge your phone?
iOS devices have put in a phenomenal effort to secure against these attacks, including requiring encryption keys before allowing unknown computers to access the device or data.