There is no need of being unlawful. It just needs to be clever enough to foil Akhera's plans. Mangala's plan would have succeeded had it not been revealed beforehand to Akhera. Even after simultaneous exchange - will Akhera allow anyone to leave from there? He is not his vachan ka pakka that he will accept Anandi, Mangala and Nimboli and let Ganga go - after all he has to take revenge from J also. At that point - K in custody would have forced Akhera to surrender/flee from spot leaving all others.
Yes even now nothing will happen to anybody because creatives will show some funny filmy scene like what happen during Rat attack. But blaming Mangala is just 😛
Waise mangala's idea might have just worked if that akheraj's friend had not been there. Akheraj was about to give up but that guy told him that jagya or police can't harm kundan anyway.