Samsung s3 home button lag

A

AC Question

Hey guys! I have a s3 for quite some years (from the release date almost) and lately when I hold the home button to close the recently apps my phone lags and after a minute or so it reboots. Sometimes it completely turns off. And sometimes when I try to turn it back on it says my battery is empty and I need to charge it. I have more than 5gb free space. Any ideas?