I agree with both of you. In fact, I dare say a GOOD writer would find a way to incorporate both ideas together along with a few more that other people would probably come up with.
Heck if they had of the F word* to give, they could have done an entire season of Enterprise dedicated to creating the prime directive - where every week some new shit hits the fan until finally, in the season finale, they just go, "Look! Don't go bothering any planets that don't have warp, ok??"
*eFFort
the prime directive makes more sense when you consider the new planets you visits won't have any antibodies for whatever new shit you gonna bring in (even with transport filters, you can still shuttle down), and that's just the biological part. I mean the same thing happened on earth and that's just one blue ball. ironically voyager had some episodes dealing with the PD. I think early on they had one where they broke it and even when they "saved the day" it was still kind of a shit idea, or the one where voyager literally becomes a god. same for ENT with was basically homo sapiens vs neanderthals and what to do when one simply dies out (good fucking episode imo, although can't remember how it ended).
as
@AnOminous said, it's basically you vs the needs of the many, once you open that pandora's box on a planetary society that's it, there's no going back there. and that's even before stuff like "giving napeleon nukes" or tech they aren't ready for. contacting them after they discover warp makes sense, since they inevitably gonna meet aliens at that point and to possibly prevent any fallout. imagine some bumfuck nasa shuttle starting shit with the klingons.
god, I fucking miss star trek making sense...
EDIT: can't remember if prime directive was already established by ENT, or if it was in part a vulcan procedure the federation simply adopted in some form.
EDIT 2 because the mods dislike doubleposts
This seems to be what Gene was thinking and heavily....often autistically...pushing for as made clear by his writing in early TNG where the above was often explicitly spelled out in sermons of varying levels of smugness
As for economics, on a micro scale its less communist and more "pretty much everything is free at a good quality so for 99.99% of the population money has no value", and on a macro scale there are regular references to interplanetary trade and commerce, not to mention smugglers and illicit goods which make me think that despite claims to the contrary, there is some kind of monetary system within the federation but almost nobody uses it or even knows about it because they are never in the position to buy/sell shit at a planetary level/illegal level.
the first one makes sense, maybe I'm too much of a naive idealist but like the UBI discussion people won't suddenly stop "living". sure, some will become couch potatoes but if you got literally everything, who cares if you do? so you're stuck in your cube watching ferengi soap operas, still doesn't mean everyone does. hence starfleet. and by that time it's already well established, so you won't just suddenly have money free money with no need to chase the green, but you literally grow up where you can do and become whatever you like (to an extend, if you wanna be a serial rapist that's probably gonna be difficult, but heck holodeck exist).
smugness just comes naturally when you think you're more evolved, plus it was mostly by federation staff, which if you go with the couchpotato idea
are better for the simply fact they decided to be not a vegetable.
as for ecomony, iirc the stuff they trade with was mostly stuff you can't replicate since it has limited supply and can't just be generated out of thin air, and even if earth runs with a post-scarcity society you'd still need something to trade stuff with others that either don't have it or need stuff they can't just replicate themselves. basic supply & demand, the details itself would probably be as interesting and enjoyable as high finance...