The parts houses generally know how to ship properly. The good ones even ship fluid containers inside heat-sealed plastic bags for insurance.
That's where I usually get air filters, so no problems.
Amazon can be hit or miss. Their penchant, lately, is to ship as much as they can in their blue/white bubble mailer envelopes.
They shipped me an O2 sensor that way and the thin outer cardboard box was crushed. It threw a CE a light, so i sent it back. The replacement also came in the same packaging, but was intact. despite the repeated improper packaging First one was sent by UPS MI, so it and the USPS also had custody as well. The second came through AMZ logistics.