Since Amazon sure ain't manufacturing dildos, it's as "safe" and "quality" as buying from any other dildo seller. You just have to do your research and know what you're buying. Silcone and none-pourus glass/silcone are the only actually safe dildo materials, anything else stay far away regardless of whose selling it.
The real question is if you want to hand that purchase history information to the likes of Amazon.
Consider buying from actual toy companies. It removes Amazon as middleman for things like dildos, and ensures that the company is getting full payment (compared to Amazon that charges for their Amazon Web Services).
What I ask myself in the same situation: Do I want to make Bezos even richer, while decreasing worker safety even further and pissing on the actual company that sells the item?