Exclamation Phone unusable, constantly restarts, problems with charging.

Hi all, I've had my HTC chacha for a year and a half. Fot the first year it worked smoothly but last six months turned into a nightmare. It started with problems with charging which today also exist. The phone doesn't charge even if it has been charging in excess of 10-12 hours overnight. Instead the percentage is decreasing until it reaches 0% percent to turn off. I overcame this problem by taking out battery and placing it back. After turning on phone again, it signalized fully charged.
What makes phone unusable is that the it constantly automatically restart itself. Usually it restarts when using applications like WhatsApp, FB Messenger, Viber or when I'm viewing a website on Opera. At first I thought it has something to do with internet but now it also restarts typing regular text messages or using camera.Tthe screen suddenly switches off and it restarts. When the phone comes back on, the battery indicator is down to 0% but after a few minutes goes back to the normal level it was (i.e. 65%).
The most interesting thing is that, while plugged for charging, I can use all this apps without restarting.
As i know that there is no isolated problem for one costumer, i suppose there is someone else who faced this proble. Also, I hope there is someone who can help me with it, I'm really frustrated not being able to use the phone regularly.
The phone is on its regular OS, never rooted. Did 2 factory resetes, didnt help.