If I understand Apple's position, lithium ion batteries can be very dangerous, and they don't want someone else's shoddy repair to cause their devices to catch fire and kill customers and trigger lawsuits.
I sympathize with that position while at the same time rejecting it's conclusion ("no 3rd party parts/repair").
You could allow 3rd party repair by voiding the warranty if 3rd party repair or parts are used (no big deal, if the unit was under warranty you would do a warranty repair, right?), and forcing a liability suit to prove that the 3rd party part and any 3rd party repair didn't cause the harm. Also kick in any "product X damaged Y" statements must also disclose any 3rd party parts, modifications, or repairs or be treated as libel/slander.
That is an appropriate remedy, not "you can't repair stuff because you might hurt yourself!" (and I admit, it doesn't give Apple everything they are looking for, if you assume they don't actually want to profit off the repairs (I don't think that is treated as a profit center at Apple, it is a customer service function, and happy customers are a strong goal for Apple); it still lets a bad 3rd party repair/part kill Apple customers, but it does force stories about it to actually be "bob's battery repair shop made this guy's new iPhone catch fire! Could it happen to your iPhone‽")