Ask a question, command "answer". You only get a six-second answer, but that can be a lot of information if you choose the question right, it's a hell of a lot quicker and less morally objectionable than torture, and it works on creatures who may be inured to pain (I generally rule torture is just an ordinary Tuesday to an orc or such, to say nothing of a demon). If as a DM you want to interpret command in such a way as to discourage an alternative to a squicky scene... that's your call, I guess, but I'd recommend erring on the other side here.
Honestly, I hadn't thought about that particular Command. That could work, but it is pretty resource intensive, especially since you need to get by multiple saves.
The spell only lasts 10 minutes, and the speaker knows when it is happening. So, however much pain you inflict, they just have to be clever for those ten minutes. Note also that trauma can alter people's perception of events. If you have been torturing someone trying to get them to talk about X, they may well come to believe some things about X that the subject expects will get the inquisitor to stop, even if they aren't factually true.
In general, I'm thinking about the Zone of Truth - Torture combination from a World Building angle. So while the spell lasts for 10 minutes, and organization could attempt to commission a chair, circle, or whatever that is enchanted with a permanent Zone of Truth. This would extend that 10 minute time frame. But even without that, 10 minutes is a long time to experience torture. And if the person is a captive, it could be repeated once a day, if not more.
As for trauma affecting memory and perception, that absolutely is a thing. However, this then extends into what is considered Truth, and how the spell assesses it. Does it take a snapshot of your mind at the beginning of the spell and use that as a basis to determine the subject's truth, versus assessing and reassessing moment to moment? If a person is particularly good at compartmentalizing their brain, convincing themselves that something fake is real or vice versa, or if they suffer from multiple personalities (the fantasy kind, not real kind), could they beat or trick the spell similarly to those that can trick a lie detector? What if the fantasy world is based on objective and inalienable reality? Would that change the way the spell works, versus a fantasy world in which reality is subjective and unknowable? Is truth per the spell based on memory, understanding, or facts? Would someone under the effects of Zone of Truth be susceptible to a Modify Memory spell, and how would that interact with the Zone of Truth in vivo, rather than before or after the Zone of Truth casting?
And yes, as a clinical therapist I understand that trauma can affect memory. But even that may have a place in a game world where Zone of Truth is fairly common. For example, a church could torture someone until they "repent" or accept the church's god as real. The person being tortured would be unable to claim such a statement until the torture changed the person's brain to truly believe the statement. This would assure them that the subject is truthful in proclaiming their desired position, potentially ending the torture. It could also be used as a form of brainwashing, effectively ensuring that the subject is forced to eventually agree and believe in the viewpoint of the one subjecting them. In fact, this would be something that I imagine a particularly nasty villain might employ in a game. Their minions set against the PCs could be innocents that were subjected to really inhumane treatment, creating a moral dilemma regarding how to deal with the minions and if it would even be possible to save them.