Whether the crash was really due to the battery can be inferred from the battery's age. If the battery is relatively new or is otherwise determined to be OK, don't issue this particular warning. If it's within, say, 90% of the expected service life, then the warning makes sense.
In any event, logic similar to the above was employed at some point to determine when to degrade the phone's performance. That is the point where the warning should have been issued. There are no valid excuses for not doing so.
Determining battery health is hard.
[1]: https://www.youtube.com/watch?v=Kw7vq_YD6JM