Battery charging algorithms are tailored to battery chemistry. So putting a third party battery in THEORETICALLY could result in poor charge, over charge, or even failure. And yes, the failure could be physical, and could cause harm.
Many cell phone companies, for instance, use a thermistor in the battery as a safety measure - if the battery gets too hot, they stop charging. It’s a single analog line. A cheap replacement may just use a pull-up instead. This defeats a layer of safety.
You also get a less accurate read of how much charge you have during use - your battery bars are not accurate. This probably doesn’t matter to you in a cordless phone, because it’s charing almost all the time.
That being said - I use third party battery in my camera. But not in my cell phones. I’ve never had to replace one in a cordless phone…given that it sits on the charger constantly, I’d lean heavily towards the real battery unless I had enough technical information to convince myself there was no issue.
-D/a