There has of course been examples, in living memory, of European martial law where the military were literally excluded from any legal limitations on their behaviour.
World War 2.
The nazis specifically excluded their troops from any legal redress by civilians in the invasion of the soviet union. Similarly the Red Army ran amok when it counter invaded Germany.
As did the japanese in WWII.

The British paramilitaries in the Irish War of Independence
were allowed to make up their own rules.

I don't think this is what people mean by declarations of martial law though. They seem to mean declarations by ones own government. Not an invading army.
Technically you could say that is what the British were doing in the war of independence. Ireland was legally part of Britain. Again it's a war, not a sudden dictatorship though. And as an Irishman I of course, don't see the British presence as legitimate.
The balkans is a more recent example. Where muslims certainly had no legal right facing the Serbs.
But the idea that in an advanced western nation the government is going to declare tyranny. And the government departments would carry it out. Has no evidence to support it.
An obvious point in the USA. Who is going to carry it out? You've had the Democrats in power for 8 years this century. And the Republicans for the rest. If they really are faking all these gun attacks and building these concentration camps for the day. Why do they never do it?
qjs