The misuse of terrorism laws during conflict situations often leads to an “unmitigated calamity” on the ground, an independent UN expert has warned.