Randomly reboots while cleaning

I've bought a used Roomba i7. It mapped my home successfully and cleaned well a few times, but now it randomly reboots mid-cleaning cycle and doesn't return to the dock. It has 332 hours of use and has completed 635 jobs. I opened it and removed and reinserted the battery to ensure it was properly seated, but that didn't resolve the issue. Could this be due to a faulty battery? The issue occurs most often after it changes floor types or when it hits a wall.

crwdns2934089:0crwdne2934089:0 crwdns2934093:0crwdne2934093:0

crwdns2934109:0crwdne2934109:0

crwdns2889612:0crwdne2889612:0 0
crwdns2934285:0crwdne2934285:0