Laptop cursor spontaneously jumps & erases; rapid thudding
My MacBook Air early '15 running Catalina is acting like it's possessed. On its own the cursor will start quickly deleting words and data in Pages and Numbers. On websites the page will flash, then be scrolled up and down and then stuck at the bottom. If I click on it, it repeats the process. This happens in Safari, Firefox, and Chrome. Meanwhile, the computer may start a series of quick thuds and won't let me quit anything, force quit, or restart. Rebooting it solves the problem for awhile. I have to hold down the shutdown button for a long time (actually probably 15 seconds or so) before it will shut off. It did a stretch of this for about 5 days 2 months ago and then stopped for some reason. It just started again tonight. I can't find any pattern to when it happens. I did re-install the OS last week because when I called Apple, they said that was the only way to solve the problem of 3rd-party software registered with Apple not opening. Other than that, nothing is different. Is my computer on its last legs?
MacBook Air 13″, macOS 10.15