Glocks can handle hardcast provided they fit the barrel and aren’t the old super soft swaged stuff.
Probably a good good idea to run a brush down the barrel every now and then.
that said I dropped and after market barrel in mine for the simple fact it shot better. Mine is an old Gen 2 with a poorly supported chamber, something they fixed in the later Gen Glocks. I got smilies on my brass with loads going under 1000fps. I bought a new barrel and a 22lb recoil spring and all issues went away.