Hi all,
Long story short: It will work!
Over the weekend I did a lot of internet research, some calculations, even tried pasting the M-type handelbars on a P-type in photoshop. The theoritical conclusion was that the M-type bar would fit on a P-type stem, ending up with a total height of about 1cm lower than the P-type stem and bar combo (the original). The P-type handlebar is 16cm above the stem clamp and the M-type 15cm. The P-type stem is about 1cm higher than the M-type, leading to the 18mm more height in total, assuming the foam of the grips is equal in thickness.
So today I went back to the store and yes!

my theories seemed to work in real life. I held a spare M-bar next to a P-type and it worked out just as I had calculated. The package remains 100% foldable. BTW you need the 1cm less height to make up for the bit of added width (M-type bar is 53cm as opposed to the P-type, meaning it comes closer to the ground because of the added 1,5cm). In the end it all evens out to the same ground clearance as the original P-type.
So I bit the bullet and ordererd a P-type with an M-type bar. The dealer was reluctant at first, but after actually holding the bar next to the bike he was finally convinced. Shouldn't that be the other way round?

Now, let's wait and see what Brompton say when they get that order.
When the bike arrives, I'll post some pics.
BTW, I even believe there will be room for some ergons. Since I've got them on another bike I can try that myself.
Oh yeah, some may wonder: why go to such lengths? Because that's just me.

And because I want as much height as possible together with some extra top-tube length (long arms and legs, so I'll still be riding with the bars well under the seat, without getting neck pains though). The P-type bars were too flexible in my opinion. The M-type bars are a lot stiffer and it just feels safer. Plus you can add bar-ends if you like.
Sorry for the rant. But maybe this can spark some ideas for other people who are discouraged by relactant dealers. No disrespect to them or Brompton in any way. The package of the bikes is already beautifully optimised for each type of handlebars. But what would the world be without some customisations...
Bye
Luca