5w40 is a bit thicker which would mean a quieter engine, but only a tiny bit, not a huge difference.
Since the noise is gone now, then it's most likely just as mshaw said, when draining out your old oil, even without engine flush treatment, you've still flushed out some of the gunk, so now the whole engine has a better oil supply. Have you noticed a tiny bit more power and economy? If you change the oil every 6 months instead of yearly, then this problem will be much less likely to happen again, and the engine should run nicer for longer. If the noise comes back before 6 months, you should probably change the oil with a good engine flush before refill as mshaw suggested.
I think I will change oil every 10-15k km now as it is not that expensive (50€ per change, Motul 8100 x-clean) and will stick to 5W40 instead of 5W30.
Previously I changed it every 1 year which could mean up to 30kkm. On next change I will use the cleaning flush also.
I did not notice some noticeable boost in performance, but the noise is gone, which is what I was really after.
Sounds like a good outcome.
I just seen the thread now so didn't say this earlier, but my last car BMW 320cd E46 had the same tapping problem, only happened when car warmed up (but could be heard while idling too, and up to any rev's). Horrible tapping sound. The oil had not been changed in 15k miles so we did a STP engine flush, oil change (very slight overfill to get some pressure to the tappet/valves) and then the sound did go after some running of the engine.
Simplest resolution, glad you didn't go through with the engine change! 4/5 times it's the most simple resolution that's required.
Yes, this was it obviously. On next oil change I will also use cleaning flush liquid.
Pretty stupid of my mechanic to first propose the opening of the engine (1000€+ cost) and not suggest a cheap oil change.
So to anyone here having the same symptoms, please change the oil prior to any major investment. It will cost you about 50-70€ and could save lots of money.
Obviously some mechanics are only wrench monkeys, nothing more.
I do agree that there are also good mechanics out there, but these are more rare to come across.
Thank you all for assisting me in this thread.