Martial Law vs Zacama, Primal Calamity
Your enchantment will be destroyed, then their creature will be detained.

That happens because, as you guessed, their creature only becomes detained after Martial Law's trigger resolves. Since it's been placed on the stack, and your opponent had priority before it resolved, they can use Zacama's abilities normally. That goes into the stack, and resolves before your triggered ability. Your enchantment will be destroyed, and then its trigger will resolve normally and detain their creature until your next turn.