Motorola can include a 3.5mm jack in the moto x4 and get an IP68 rating. Why does Fairphone have to eliminate it to get an IP54 rating? Clearly, having a 3.5mm jack is not an impediment to getting an IP54 rating.
The S5 had a removable battery and backplate with headphone jack exposed, and had a IP67 rating. It's easy enough to do just no one wants to put in the engineering work.