The last time I tried to replace a battery the phone (a Nexus 5) was never the same—I broke one of the small plastic tabs in the case, which I think led to a poor antenna connection. If the phone isn't designed for it, it's easy to mess something up like that.
Apple does seem to be doing a better job than most of the Android OEMs at ensuring longevity.