The Samsung Galaxy S5 has a replaceable battery and is water resistant, it's definitely doable.
Also, this entire argument feels like it's getting way too much significance. It's definitely doable, even with IP68, there are tons of replaceable-battery-operated waterproof devices out there, this shouldn't be a reason.
Buyers would also rather keep the solid slab with no hatch form factor, than see the phone be 2mm thicker I assume. A lot of other devices don't have a size budget that is as extreme as a modern smartphone.
Put the other way: a slightly bigger phone (because of some separating compartment, gaskets, battery in a plastic cartridge and so on) could instead have been a solid slab with a slightly larger battery, so several hours extra battery time or higher performance at the same battery time.