This isn't a direct answer to your question, but if you're using a Mac running (I think) Mojave or later, it will respond to rapid movement of the mouse back and forth by temporarily showing the cursor as a very large arrow. Like you, I lose the cursor from time to time and find this very helpful.
Jeremy