I think it makes the most sense to regulate based on maximum achievable momentum (maximum engine torque is used as a heuristic for this), or even maximum achievable collision force (momentum ÷ surface area of forward-travelling side) of the vehicle at any carrying capacity.
So a motorcycle is a lot more dangerous than a moped, not even because of the weight of the vehicle alone at speed, but because you can fit two people on there, the motorcycle has enough torque to get up to the same speed with those two people aboard, and so the whole vechicle-rider system will have more momentum (impart more collision force) at the same speed.
And some electric skateboards / hoverboards are also very dangerous, because if they manage to fully torque up while without a rider, they can shoot out and hit someone in the legs with a high momentum delivered across a very small front facing plane. Like a bullet!
(And, obviously, trucks are more dangerous than cars, simply because you can put a bunch of stuff in the bed and still get them up to the same speed as a car.)
Although the simple solution here is policy and divided roads, I could imagine a simple-ish technological solution: a torque governor hooked up to normal-force sensors on the suspension. So a motorcycle with one person on it would simply not be able to "work as hard" as the same motorcycle with two people on it [except when going up a hill, since normal forces would increase]; and a vehicle with no rider at all would immediately clutch to neutral and brake to bleed off the "above limit" torque.
A low powered moped doesn't belong in the road in most places.
Bike lanes are too narrow for motorised vehicles, and some ebikes are pushing the limits as well (eg. Urban Arrow bikes don't make me feel very safe on narrow bike lanes either)