I always liked to imagine the federation had a separate economic system for trading with capitalist coded races in Star Trek. Basically an isolated, pretend command economy where, for the purposes of importing/exporting, all of these whacky alternative currencies are accepted and then immediately melted down into whatever the replicator uses. The federation operates at a loss while trading this way but the loss is ideologically justified by eventually converting the species into a federation member that will convert to trek's brand of fully automated communism.
The Ferengi's free market ideology is baked into their religion so they're this one annoying stubborn species that the federation can't flip, and the Ferengi continue interacting with the federation because they understand this system and continue to take advantage of it.
All of this headcanon serves to make any and all references to currency make sense when I watch Trek. Makes the gold-pressed latinum conundrum a sort of paternalistic struggle between the federation, trying to uplift the Ferengi, and the Ferengi government who just wants to keep hoarding shiny metals.
"Yes, sure, we'll accept your...two tonnes of worthless metal, sure. Have you given any further thought to our aid programs...?"