If you know your load is exactly 40 Hp, never higher, then it's best to use a motor that's rated for 40 Hp. The nameplate rating of a motor means that is where it was designed to run most efficiently. If you use a higher Hp motor than you need, you will just be running somewhere in the lower part of it's speed-torque curve. Your efficiency will not improve if you use a 100 Hp motor but only load it to 40 Hp.
Also, many motors have a service factor of 1.1 or 1.25. If it does, then multiply that by the rated Hp. That will tell you what the peak efficiency range is for that motor. For example; if the motor is nameplated "40 Hp" but the service factor is 1.25, then that particular motor will run most efficiently between 40 Hp and 50 Hp.
Long, long ago, in a galaxy not too far away:
GE had a great movie sized poster that showed pictures of an x Hp AC motor as it developed over the years. I think it was 10 Hp, but might have been a little larger.
If memory serves me, there were 6 pictures in all. The first picture showed a pancake looking unit, easily 3 foot in diameter and only a foot in length (ok, it might have been 4 foot and 18 inches, but you get my point). It was Class A insulation. Maybe from around 1880. Through the years, the diameter was reduced step by step until you got to the first T frame motor and Class F. I don't believe that Class H had been developed at the time the poster was published. The last picture showed a 215T frame: about 12 inches in diameter and about 16 inches long (without the shaft extension). Quite a dramatic difference.
I was once asked to look into the replacement of some Canadian 25 Hz motors (and go to 60 Hz). The original motors were nearly 100 years old and were working perfectly, and except for the 25 Hz design, these units did not need replacement at all. In another case, I looked at 75 year old vertical pump motors that the city wanted to duplicate. Their spec still required a Class A rise by thermometer with a Class H insulation system. So much for the need for service factor.
To summarize what we've been saying: 40 Hp is the right size for 40 Hp load. Going higher in driver output capability will only increase the losses the higher you go. As noted previously: today's efficiency curves are nearly flat between 75 and 95% load, but the Power Factor curve isn't: it gets worse the more unloaded you go. Could a 100 Hp motor drive this? Certainly. Is it wise or cost effective: No.
We have not really considered speed here. Most of the assumptions have been made around an 1800 rpm unit. But if you are direct coupled at 900 rpm, then the answers are only amplified.
Plus: you need to consider cost, weight, cable size, contactor and overload size, etc. I question whether the market has enough margin for one manufacturer to use a 40 Hp, and his competitor to use a 50 or 60 Hp.