No, just plain oil is a 'better' lubricant. It has a tougher film layer because WD 40 is thinned like crazy. It stays in place much better than WD 40, too.
A modern O-ring chain has all the lubricant it needs in the grease that lubricates between the pins and the plates, and which is kept in place by the O-rings. The other point of wear is between the sprocket teeth and the chain rollers.
It doesn't matter that oil is a better lubricant than WD40, because unless you supply a constant stream of to the chain and sprockets, it doesn't stay around long enough to do any good. If you lube your chain every 300 miles, the oil on the rollers and wearing surfaces of the sprocket is gone before you have gone ten miles, and that is being generous; it may be all gone within a couple of blocks.
There may still be oil on the side plates, which will keep them from rusting. Other than that, the oil does nothing to make the chain last longer, and nobody has shown otherwise.
To make a chain last longer, give it a continuous supply of oil, as with a vacuum-driven Scottoiler, ar an electric Hawkoiler. 40,000+ miles
To get the most life out of a chain on an off-road or dual-sport bike, keep it clean. That is where WD40 comes in. Clean off the grit with WD40 and a grunge brush to get the longest chain life.
15000-20000 miles
To kill off that same chain prematurely, oil it. The grit will combine with the oil to make a very effective grinding paste that could finish off a new 0-ring chain in less than 5000 miles.
No proprietary chain "lube" has been shown (last time I looked) to have any effect on chain life whatever. They can't, because they do not stay on the places that need it, i.e. the rollers and load-bearing surfaces of the sprockets.
If anybody ever tells you what a great product X brand chain lube is, ask them how long their chains last, and where they ride. They will have no idea, and most do not ride far enough to wear out a chain.