Here "treasures" refers to the boxes or bags they used to carry their treasures. AT: "the containers that held their treasures" (See: [[rc://en/ta/man/translate/figs-metonymy]])
# God warned them
"Afterwards, God warned the learned men." God knew that Herod wanted to harm the child.
# not to return to Herod
This can be translated as a direct quotation. AT: "saying, 'Do not go back to King Herod'" (See: [[rc://en/ta/man/translate/figs-quotations]])