The transporter was a terrible idea in terms of good science fiction because if you can do that, you are GOD!! There is nothing you couldn't do if you had access to the physics making it possible. It would be a whole ship and fleet of Q's (De Lancie's character in TNG).
I don't understand explain why there is nothing you could do if you had that?
Once they did the transporter, it was a small step to the replicator. Much better would have been less god-like technologies to synthesize food matter from other matter.
What is wrong with synthesize food ?
There is nothing you could not do.
You would have complete control over matter and energy from the quantum level (Heisenberg compensators, hehehe) on up. This is equivalent to complete control of anything and everything because all of reality is composed of matter and energy.
Anything you can imagine could be done, I could write techno-babble to use transporter theory/technology to do it. Just dump the data into the pattern buffers and create matter/energy constructs of any kind any where and any when you want. Complete control of reality, limited only by your commitment to the scale of implementation of the technology.
You already saw a demonstration of the energy requirements if the transporter is based on E = mc^2. But since good old NCC-1701 had no where near that much energy, it was done some other way, which has never really been explained. This also means that your control over energy includes creating it from nothing.
As far as the limitations introduced in various episodes, that was all damage control in terms of not admitting that the tech would let you do anything.
Nothing wrong with food synthesis tech. Good science fiction there. But the way they did it was by using basically the same thing as transporter technology. I'm saying there are other ways to do it that would be much more plausible.