I think it comes down to what you want. With the 240, Z4MC and an E89 it will holistically cover over, but not offer the experience of them all individually. There isnt a car that will unless you go down a 2+2 route like a 911 which would be what I would buy instead.
The E89 and G29 offer very different experiences to what I think a sports car should be, this opinion doesnt really exist in the market anymore, unfortunately, so may well be redundant. Both sit in the GT category and honestly have more in common with a 3/4 series than the E85/6.
I like a car to make me feel alive and connected. Your input directly affects output which is very rare in today's cars. So much stuff behind the scenes keeps you on the road.
Many who haven't owned more engaging cars may disagree and for a modern car they are about as good as it gets but for me doesnt hit the mark.
Great engine, fast, I actually like the way they look, good tech, nice place to be etc but the way it drives on a/b roads or for a specific car trip like a euro trip just misses the mark. Im sure you can improve just like the Z4M but out the box its not there. If a GT experience is what you want, then great. I would think it will feel similar to the 240, but obviously, you lose the back seats. The 240 you would give it the benefit of the doubt as its a quick entry-level car but the Z4, specifically for experience its not there like the older cars are.
If it were me I would keep the Z4MC its is a much more raw experience and is a compromise but thats what makes it special grab it by the scruff of the neck. The G29 is so far from this and if you drove them back to back there will be positives and negatives.
That being said if a new car is what you want there is nothing to choose from and the Z4 is compelling. Open it up to some older cars and it goes way down my list.
I test drove one when they came out and the speed is excellent but it just felt a bit numb and out of place on quicker, tight roads I could only feel was it drove a 3/4 series with 2 seats.
Also, the comment on a 718 being the ultimate hardcore sports car is pushing it too. Again, great cars, but they are so good that nothing moves; it's like a surgical scalpel, so if you enjoy that, then perfect. The Z4M is like a sledgehammer in comparison, a complete handful at times, which to me makes it more hardcore you really need to be on it when pushing or it can put you in a hedge. My dad has a 981 Boxster GTS, and it's much faster than the M in every way, but I found it pretty sterile. Place it, and the car just does it, whereas the M will leave you with a big smile when you keep it on the road.
He also has a 991 Carrera S and find this hits the mark really well. Its a super comfy cruiser and does silly MPG when you want it to, stick it in sport plus and its a complete handful. With the engine being over the back its a different experience to the M but along the same lines that still makes you feel alive.