If the charging method makes the device hot, yes. Leaving it plugged in will eventually damage or prematurely age the device. If the charger doesn’t heat up the device, it doesn’t have a noticeable effect to me. I had two warranty replacements of my 2018 iPad Pro and that’s the only cause I can think of. Apple Support said it wasn’t a common issue, but it wasn’t obviously my fault either or they wouldn’t have replaced it. I was using the 30W charger. I stopped using, but tried it out last night and sure enough, it makes my 2020 iPad Pro 11” heat up too if I use it while charging. The 18W usually doesn’t and when it does it’s not as warm. That’s charging while using YouTube specifically.