Hah some Ferengi actually did this in an episode of TNG! They showed up on a random planet with a replicator and then used their ability to produce anything as a means to subjugate the population.
https://memory-alpha.fandom.com/wiki/False_Profits_(episode)