I tend to play RAW with reference to various English style guides if the intent of a passage is deemed unclear (we assume the authors correctly communicated their intent, which is, of course, not always the case).
That said, this is how I have seen this spell dealt with:
The caster takes on the form of the creature as it was when it lived, not necessarily right before it died. The specific form of the creature assumed is chosen by the GM. Specifically, the GM I played with had the spell cause the caster to take on the form of the creature that was most typical to it in life. Giving diamonds to a commoner, thus, does not produce wealth but killing Scrooge McDuck might (though he's probably not a hominoid). It should be noted that it does not matter what you put on or remove from the corpse after the creature dies, the spell references the gear they had in life.
The spell CAN duplicate equipment, including functioning magic equipment. It specifically says it can duplicate gear and doesn't say 'but magic items don't work' or 'but it's all made of hemp' or some other caveat, which spells and effects that have caveats like that specifically do. This is why it is a 6th level spell. It does make the spell one of a few spells 'more powerful than Wish' (except that Wish can duplicate this spell) in very limited circumstances in that you can duplicate very powerful magic items (potentially including even those that cannot be otherwise made), but those circumstances are GM-controlled and incredibly difficult to manufacture. In general, the kinds of beings that typically carry around epic magic items such that the form you would get with this spell would include them (with this GM) are not corporeal hominoids, though you COULD use this spell to do that if you had the chance. Your party members, for example, are likely good targets. Probably wont go too well for you if you try to kill them and eat their flesh, though. On the other hand, you do almost certainly get a nice suit of full plate if you eat a knight and super expensive clothing if you go for a king. Many people have some pocket change you could probably copy with this spell, and wizards that use iconic staves are just about your best bet for high-return cannibalism.
It should also be noted that, while the spell is permanent, it has tono special protection against being dispelled. I would be careful about using and then discarding your magically produced goods, because an unfortunate dispel magic cast on a single generated coin would technically end the whole spell.