If you were comparing a truck with a 4.8 to one that's a 6.2, guess what? The 6.2 has more horsepower. Outboards are rated by their horsepower, which means if one motor has 25hp and another one has 25hp, they have....the same horsepower. What is horsepower? It is a calculation of torque and RPM. This means that if torque is higher, HP is going to be higher too because the constant doesn't change. Thus, with small outboards, the displacement only means that the larger displacement engine is going to use more fuel at the same horsepower, and they still make---the same horsepower.
Thus, a 25hp ETEC, although a much larger (and heavier) engine is still just 25hp, while the 423cc Yamaha is also 25hp, and because of that they both make 25hp regardless of the engine displacement.
Since I'm in the business, I listen to all of the arguements, and this one comes up often. Look at vehicles, as an example. A Ford pickup with a little bitty 3.5L V6 makes MORE power (and torque) than a MUCH larger engine. Think on that a while. 3.5L V6 makes 450 horsepower in the Raptor. Wasn't that long ago that a 454 and 460-which are both a LOT larger (obviously) didn't make half that much power. Yamaha did lots of homework on their 432cc outboard. They were able to make tweaks internally so that it makes the same power and torque as the rest of the 25hp motors. I have both a 3 cylinder 2 stroke 25hp yamaha, and a 2018 yamaha 25hp, and there is not a huge difference in power. Where the 3 cylinder gets it's "reputation" is when guys start modding them with bigger carbs lighter flywheels shaved heads exhaust and tuner mods, etc. THEN-it wakes up. They'll make 80hp or more if you spend enough money on them. That 432cc 4 stroke, there aren't any mods available for it that I know of, and quite frankly in my case I don't care because it's such a sweet little reliable motor.
In your case, if you are loading it with 4 guys and gear, and you have a 40hp rating, go with the F40. The F30 and F40 are the same motor but the 30 is detuned by 10hp. That means that the F30 weighs 215 lbs (lightest version). The down side is that if you have a short transom, you have no choice because Yamaha doesn't make a F40 in short shaft in the USA. I hate the way they do that. I want one for my war eagle but can't find one so if I want a 40 that bad, I've got to send the boat back to the factory and have them build the transom up to 21" which ain't happening.