Most places which do ear piercings use guns rather than needles and most people don’t have an issue. There is a lot of info out there promoting needles over guns as they are easily sterilised between uses (although please note that sterile does not equal clean! sterile dirt is still dirt, a sterile toxin is still toxic…)
That said, any process which is not properly controlled and managed in a clean/sterile manner can result in issues. Had I been able to go somewhere to get my ears pierced, I would have gone for a needle if I could, but would have gone for a gun if necessary. In either case, the people and condition of the the shop would have dictated whether I would use them. The biggest issue, I would suggest, is post piercing cleanliness, using the appropriate solutions at the correct intervals and managing any hint of infection/inflammation.
The kit I used myself had individually sterilised cartridges with the needle studs and caps held in place and those were the only parts which came into contact with my ears. Yes, made of plastic – which can be easily sterilised (with Ethylene Oxide for example) – but plastic can’t be easily re-sterilised in, say, a shop. There are bacteria everywhere – the aim is to prevent too many of the wrong ones getting into the wrong places!
Anything which pierces the skin carries a risk – it’s up to an individual to assess that risk and decide what to do.
(and, yes, I have a bit of experience working with these pesky bug things…)