TBH I've never been totally blown away with the sharpness of the 12-40mm, although it is undoubtedly a very good lens and also renders nicely. It is the best m4/3 zoom lens I've used though, although admittedly haven't used them all. The 14-42mm EZ, 14-42mm II, and 12-32mm pancake lenses are all surprisingly good and not far off the 12-40mm sharpness wise. They don't render quite as nicely, and of course there's the aperture difference and weather sealing.
With the 12-50mm you have to accept the aperture limitations as you do with the pancake zooms, but for some reason it's the sharpness of the 12-50mm that gets conflicting views. Some say it's poor, some say it's pretty decent. A while back I found some RAW sample photos from the 12-50mm online somewhere and they were 'ok'. Not as sharp as the 14-42mm's or 12-32mm though. However, as I did not take the shots with the 12-50mm myself I could not rule out user influence on the sharpness of course. Best option is to try one out for yourself.
So back to your comment about the 12-40mm, I'm sure you could have "got away with the cheaper option" but I'm also sure it wouldn't be able to deliver what your 12-40mm can. Purely in terms of sharpness then it wouldn't be far off, but rendering, out of focus areas, micro contrast, and of course weather sealing* would be better on the 12-40mm (except for the 12-50mm which is also weather sealed IIRC).