Furthermore, determining the law is not the same as determining the outcome of having that law on the books. The law is permissive about many immoral behaviors, at least in part because the enforcement of laws regulating such behaviors would cause greater harm than the behavior in question. Prudential judgement among lawmakers is necessary to determine what should and should not be regulated.
If it's a law that's unpopular enough, it's not enforceable pretty much anywhere. Even less so in the US, because of the staggering number of civilian owned guns.
Tanks can go through some of the doors, especially as long as you know there isn't a basement. So if you have a small segment of a population you need to go through doors on, sure.
But if it's enough of the population, then tanks don't work to enforce the laws.
It doesn't scale.
The military as a whole doesn't work well as a police trying to enforce laws, but even if it did, it wouldn't be the tanks. It would be door to door with infantry.
And 7000 IFVs, and 15,000 APCs, and 25,000 Mine Protected Vehicles, and also a bunch of fixed and rotary winged piloted and unpiloted aircraft carrying PGMs, all of which can go through specifically chosen doors, and, as with the tanks, all of which can send something through many specifically chosen doors (or windows, walls, whatever) in a fairly short period of time.
Not good for arresting people, bringing them to trial, and providing due process, but that's not the only means of raising the expected cost of non-compliance with the law so as to coerce compliance.
It's a volunteer force. Might simply refuse the orders as unlawful, might repeat 1861, depending on the law.
I'm told "fragging" comes from the weapon of choice used by conscripts in Vietnam against unpopular commanding officers.
Personally, I see no issue with increased accountability on both of these fronts. If you sign up to be the person who gets to decide whether other humans are put in a concrete box for years at a time, you should be willing to face the highest levels of scrutiny for your decision making. And if you are wrong there should be harsh punishments for your failures.
I don't know how better to phrase this. I fully agree with your values—but look at the state of things, it's right now even a contentious issue whether innocent people should be jailed or not. (That is, whether criminal defendants should enjoy their constitutional right to pre-trial bail, or if they should be put in a cage without trial, without conviction—the majority seems to lean in that direction, in the name of safetyism. The topic of "bail reform"). It's a complicated game where everything is genuinely awful and there's no clear path towards making things less awful, and a lot of the naive ideas counterintuitively make things worse. Political pressure on courts definitely would make things a lot worse, at this point; dead certain. What can one do, in such a world?
Any system you'd build in this mold, the criminal justice mold, would be the same or a clone of the current one, inheriting the same flaws. The prosecuting agency would be lenient towards Type I errors, because few people care; and I think in the net it'd increase their occurrence, by severely penalizing Type II errors.