Random hipshot #1:
Tarsus Four had it's own food attacked by an exotic fungus, the majority of the food was destroyed. That's why they needed ships to bring in food.
It must have been more severe than that. If Tarsus IV were a habitable planet with arable land, then the survival of 8,000 people would not have been in the slightest jeopardy even with total loss of stored food. The people could have been dispersed to the landscape where edibles would have been found in abundance.
This can't have been the case for two reasons. One, this "Kodos" character found followers to his claim that 4,000 people would have to be killed so that the remaining 4,000 would not starve; such a claim would alienate any followers if there was a planet full of food around the colony, but not if there indeed was "virtually no food" as stated - a situation specifically calling for a barren world. Two, relief was said to have arrived, but too late to prevent the executions; had the colony made an emergency call for unscheduled food shipments, there would have been hope of them arriving in time, and Kodos would not have found followers. But if calling for help were impossible, and this gave Kodos the support he needed, then arrival of relief dictates regular, scheduled food shipments.
Random hipshot #2:
So sorry, no "energy to matter" for you...
While the "normal" mode of transporting is rather carefully described as moving the original matter from A to B, simply in a more moveable, "phased" form, there's some evidence for energy conversion for us in the special cases which so often strike our transporter teams. Say, we have the two episodes where a person is duplicated in transport, "Enemy Within" and "Second Chances", where the source of additional matter is left undescribed. Since supposedly there never is spare phased matter floating around, the transporter process must have been making use of something more easily accessible, which would open the way for using the basic transporter process for manufacturing. Then there's "Lonely Among Us" where Picard "beamed out, energy only". His matter stream (here referred to as "his physical pattern" by Data) was evidently left in the machinery, and atypically spent more than an hour there, but Picard's return involved some supernatural twists which may have allowed for the unusual recovery of such an old pattern. Yet the initial separation of "energy" from "physical pattern" was seemingly achieved by the standard transporter machinery, in a way our heroes immediately recognized, indicating the system is
capable of fooling around with "pure energy", whatever that is.
Basically, what I'm saying is that while standard transporters are not replicators and vice versa per se
, it's not just their operating principles but their actual practical modes of operation that are common or interchangeable when need be. Indeed, a replicator was turned into a transporter in DS9 "Visionary", in seeming mirror image of "Enemy Within" or "Second Chances".
What implications any of this has on war economy is unclear. A couple of special cases involving top-notch Starfleet hardware, unique natural phenomena or the efforts of Klingon elite operatives need not have any noticeable impact on what the respective societies can do on a large scale.