Replicators work via the conversion of matter into energy and vice versa.
Not according to the tech manuals. They work by taking a pre-existing stock of matter containing the necessary elements and manipulating the particles into the desired pattern via transporter technology. Which is still fanciful, but nowhere near as nonsensical as the old "matter-energy conversion" saw -- which would be an insanely dangerous way of doing things, since if you converted, say, 12 pieces of Cheerios (1 gram worth) into energy, you'd get a blast the size of the Hiroshima bomb.
Your point being?
Conversion of energy into matter and back again is Nucleo-synthesis on a much smaller scale with control (for the Federation), and they operate with technology and knowledge that are at least a millenia ahead of ours.
Remember that Vulcans were already out in space for at least 2000 years before Humans (who were relatively new to the block).
And with exposure plus some minor (if not heavily) restricted assistance from the Vulcans, they were able to catch up to them in just over a century, further advancing existing knowledge from dozens and hundreds of other races in the next 200 years (which culminated in the 24th century).
So ignoring the Tech Manuals (which aren't canon in the first place) in this instance to favour direct energy to matter conversion could be plausible (still, the process is not perfect).
They kept saying it's a conversion of energy into matter and/or matter into energy.
Rearrangement of plasma particles on a subatomic scale.