The way we always did, of course. I’ve an underwater camera from the 80s that has user replaceable batteries and film.
The idea that they have to be designed the way they are for dust/waterproofing reasons is just propaganda by the device manufacturers. There’s more money in them not being serviceable because that means that they can upcharge you for fixes, or better, push you to buy a new device when your current device doesn’t work the way it should.