But you can put up a firmware barrier that keeps the phone from booting up, or at least from operating at full advertised capacity, unless it's an "authentic" battery that's been officially registered to that particular phone's serial number, which can only be done via special tools and software that are only available to official Apple repair shops. They've done it with cameras and screens and buttons, why not batteries? It's just another part.
At that point there's no way they can argue that the battery is user-serviceable without extra tools. Sure, they could argue that the law doesn't specify that they can't sabotage the device if you swap your battery but European courts have traditionally taken a dim view of that kind of tomfoolery.
I'm pretty sure that Apple aren't going to risk having to suddenly take all of their devices off the shelves. It's cheaper to comply.
I think they're already complying. Tri-tip bits are already bought easily and affordably on Amazon. Same with suction cups, picks and tweezers. Literally $30 or less to get all of the above in one nifty carrying case. If you have suction cups then you can break the screen seal without using heat and let's be honest, hair dryers are perfectly adequate for these repairs. It's literally what I use for friends and family repairs that I do at home rather than in my workshop.
I think it's a step in the right direction but not even remotely strong enough to force change on current cell phones.
Probably voiding warranty for any phone that has its battery replaced by the user instead of having it done at an apple store/apple vertified store. Or some good old planned obsolescence where the phone detects a replacement battery and just stops working as fast as it used to. Anything to get people to buy the next new iphone every year.