This is a sad reality on both these platforms and yes, it does happen (how often I can't say). I'm glad it was resolved and you are driving again. You will see repeatedly on this forum that there are a few steps you can take to reduce the risk and buffer the damage but you can't eliminate the problem.
1. If you need the income, drive for multiple platforms so you have a backup if you are temporarily (or permanently) removed from one.
2. Do not be afraid to avoid a ride if something appears off on pick up. If a rider is arrogant before or during pick-up, they are more likely to be a problem.
3. While I am not necessarily a proponent of avoiding all pool rides, be extra cautious with them as they are more susceptible to problems. It's a cheaper platform and sometimes a higher stress environment. A danger when we run the risk of riders making things up when they want to try and get a free ride.
4. Many have dash cams to provide evidence to defend yourself if needed. Although I can't say for sure if Uber or Lyft would consider viewing the dashcam as evidence.