I'd assume the solution was introduced with the iPhone 6. The problem was there much earlier, due to the way Li-Po batteries work.
As such, it could even be counted as one of the touches Apple is known for that other OEMs don't bother with. It just needed better communication.