I don't recall too many members here that had problems, but there have been some news stories that got picked up by members, and posted.
The common denomitator seems to be two things or both.
1. Riding the scooter type ebikes, that some cops, and even judges can see as a "moped" despite any applicalble state vehicle statutes. In some cases, the trouble starts when one of these bikes is ridden on the sidewalk, wrong way up a one way street, rolling a stop sign, etc. To the cops, you are a motorcycle on the sidewalk.
2. Being known by the police in the first place. In one Arizona you tube video, it's clear that the guy getting hassled was riding on the wrong side of the street on a scooter type ebike. It's also very very very obvious that the guy is well known by the cops, who love to bust him for anything they can come up with, like riding a bike on the left side of the street. About 7 cars showed up just to spectate and gloat. So if you have a history with the local cops, you gotta stay legal.
Florida has a weird moped law, so make sure your bike is really a bike BY FLORIDA STATE LAW. The fed law applies only to manufacturing and selling ebikes. Some guys had big problems trying to register as a moped, with the larger x treme scooters. Some kind of deal where the manufacturer has to have paperwork on file with Florida dmv, or they won't accept the vin number.