OK, so many users here have machines that are basically light motorcycles. Although the bikes may be ridden responsibly, here in the USA you are allowed only 20 MPH and 1 HP / ~750W so consequently any decent electric bike is not supposed to be operated on public roads.
As for myself, I exercise good judgement and try to not scare anyone while riding the ebike at "reasonable" speeds. If I see a cop I slow to 20 and start pedaling. Now, these 2 things will keep anyone's odds of confrontation with the law low...but you still run the risk of an awkward interview at the least if pulled over with a bike that will jump forward or smoke the tires at 5 million RPM if the cop tries the throttle. Naturally, the solution here is a computer controlled speed and power selector "kill switch" which works with any halfway decent controller on the market since they all have that functionality. You could just use a mechanical one on the bars but that would be pretty obvious and easily discovered. With a computer you can have some sort of reset pattern that won't be uncovered during normal inspection. So, trigger it and the bike is locked in to 20 MPH / ~750 watts and can only be reset by a knowledgeable user by non-obvious methods. You could also just have a jumper you pull and casually discard, done. I'm sure many, many people have already modified their bikes in a related fashion.
So, with all the users out there around the world riding hopped up ebikes, I ask...do you have any experience being pulled over on a bike that was too fast, flipping a switch to limit power and speed, and then offering to let the cop ride your bike that now appears to fully comply with the law? How did that go?
As for myself, I exercise good judgement and try to not scare anyone while riding the ebike at "reasonable" speeds. If I see a cop I slow to 20 and start pedaling. Now, these 2 things will keep anyone's odds of confrontation with the law low...but you still run the risk of an awkward interview at the least if pulled over with a bike that will jump forward or smoke the tires at 5 million RPM if the cop tries the throttle. Naturally, the solution here is a computer controlled speed and power selector "kill switch" which works with any halfway decent controller on the market since they all have that functionality. You could just use a mechanical one on the bars but that would be pretty obvious and easily discovered. With a computer you can have some sort of reset pattern that won't be uncovered during normal inspection. So, trigger it and the bike is locked in to 20 MPH / ~750 watts and can only be reset by a knowledgeable user by non-obvious methods. You could also just have a jumper you pull and casually discard, done. I'm sure many, many people have already modified their bikes in a related fashion.

So, with all the users out there around the world riding hopped up ebikes, I ask...do you have any experience being pulled over on a bike that was too fast, flipping a switch to limit power and speed, and then offering to let the cop ride your bike that now appears to fully comply with the law? How did that go?