We had a new helmet delivered this week, it came in the normal post and was packaged in a polythene mailing bag. The helmet was in its retail packaging alone inside the bag.
In the past I’ve ordered one along with other things and it came in a larger outer box all in together.
In both cases, the retail packaging showed no signs of damage or neglect and neither did the helmet inside. If there had been damage to either I would have likely returned the helmet for a refund.
That all said, there are no guarantees, so what can you do? Buy from a retailer you trust and contact them beforehand if you want to. Consider ordering extra items you will use like a sweet new pair of spare tyres. Then these will be shipped together in a secondary box and possibly padded. Choose a retailer you know to use package padding, or make a special request. When it arrives, check for any signs of damage and return it if you need to.
Oops I meant to finish by saying if you’re still not comfortable, it’s worth a visit to a shop to inspect before you buy and then you can transport it home yourself. Not the only benefit, See also RoboKaren’s answer.