Phone data security when plugged in to hotel power supply
Generally no that is not true. However it is possible that bad actors have installed devices in some chargers to do nefarious things. The chances of you actually running across one of these? Probably slim but it depends on what kind of places you try to charge your phone. So no way of telling.

You can, however, protect yourself from such attacks by using a charging only USB/Lightning cable. Finding such cables is left up to your clever use of Google.