First, by moped it is important to be clear what is meant. I feel you did this and am glad to see it. Many people call any small motorcycle a moped whit no knowledge of what a moped is. As you made clear, a Moped is, generally, 50cc or less. It also has working pedals.
I have had a moped, an e-bike, and an electric scooter. It really depends on what you want it for. In the states the moped has a significant problem of being neither fish nor fowl. They are not permitted in bicycles only areas and many riders are not comfortable with mixing with regular traffic. There are often licensing and registration requirements for mopeds. Mopeds were extremely popular in America in the 80's but were all but legislated out of existence. They went from being a special class of bicycles, with almost no restrictions on use, to a special class of motorcycles, with many restrictions.
The electric scooter is in a similar place as the moped. It does not fit neatly into the existing structure.
The electric bicycle is in a unique place, it is currently in the same place that mopeds were in in the 80's. This gives it a unique advantage that it can be used and ridden as a bicycle.
As far as which is better, first I will say that the electric scooter is the worst choice. I only have one because it fills a unique nitch here in China that does not exist in America. The moped is better in that it provides far greater range, the weakness of electric bicycles, and slightly more power. However, the electric bike is better in that it does not have the licensing and registration requirements, it is easy to fuel, just plug it in. Further, it can be treated like a bicycle, this means paths and bicycle parking areas. The lack of petrol fumes means that it is more welcome indoors.
It really comes down to what you need, what are your range requirements? What is your parking situation like?
Back to the question
So how are they similar in terms of speed, power, safety, and practicality
Speed, the Moped is faster.
Power, The moped has more (generally) but it is hard to compare electric to petrol power, they feel different.
Safety, this is a tough one, there are too many variables. Mopeds often use small motorcycle parts instead of bicycle parts. This may mean that they are more durable. They are often physically larger and may have better suspension parts. However, a bicycle can be built in nearly any way you want so it is hard to answer this one. Moped riders tend to think and act as a small motorcycle instead of as a bicycle If you go this route I would encourage you to look into a basic motorcycle riders safety course. safely has more to do with the rider than the machine.
Practicality, like I said, what is it that you need? range? parking?