Can the spell "Command" be used to cause unwitting damage?
RAW: Yes, you can, IF that damage is unbeknownst to the target (and in most cases the caster as well). You could not tell the target to walk off a cliff, jump into the spike pit, or smash its face into your Paladin's Warhammer. You could however tell the target to walk down a hallway you suspect but are not certain may contain traps. Why? Because it wouldn't be "directly harmful to it", it would be potentially indirectly harmful to it. What if it doesn't trigger any of the traps you aren't even sure are (and may not even be) down there? So no, it could not be used as a foolproof trap detector because unless the GM tells you and you (your character) becomes aware there are traps in said hallway, the spell would not fail. Let's say you poisoned one of their 5 rations and then told them to eat one? You can't be sure which one the target will eat, so it's still indirect.
As for the in-universe thought process? You are exactly correct. Self preservation would cause the magical command to fail, to cease functioning, to not take effect. If the target is unaware that it needs preserve its own life from something that might occur as a result of following the given command, then there would be no need for self preservation, and thus it would follow your command.
Speak with Animals works, Awakened Mind doesn't
You really said it all:
You speak a one-word command to a creature you can see within range. [...] The spell has no effect [...] if it doesn't understand your language
Command has a verbal component, you need to speak a word. Since Speak with Animals lets you verbally communicate with animals, you can command them. Since Awakened Mind lets you telepathically communicate with creatures, you can't use it to command them.
In general, any spell /feature that let's you verbally communicate would let you use Command, and any that doesn't won't.
That's RAW (or at least as far as I can tell), but if your DM is ok with Awakened Mind letting you employ Command (as long as it does not get rid of the verbal component) I doubt it would be too unbalanced. If DM and player are onboard, go with it.
Also, a very conservative interpretation of Command could argue that "Speak with Animals" is not technically a language and so Command still wouldn't work, but since
You might be able to persuade a beast to perform a small favor for you
I'd say that making Speaks with Animals insufficient for Command is a bit absurd. Sage Advice agrees on this point:
Iain A. Phillips:
@JeremyECrawford does casting Speak with Animals allow you to cast spells like Command or Suggestion on beasts? #DnD
Jeremy Crawford:
Yes.
Also here is Sage Advice for the interpretation that Awakend mind or other forms of telephatic communication don't work for verbal components (not explicitly saying that Awakened mind won't let you use Command on a creature that doesn't understand your language if still performing a verbal component, but strongly implying it):
Jeremiah mcDonald:
@JeremyECrawford oh Ruler of rules, can you advice on using Awakened Mind to cast vocal component spells such as Command or suggest?
Jeremy Crawford:
Sound is the key part of a verbal component, so saying the component in your mind doesn't help. #DnD
Best Answer
While gestures aren't part of the spell's magic, they might still be interpreted.
Before I start, the spell does explicitly say that the DM determines how the target behaves, so it's ultimately the DM's call. As I read it, gestures are not part of the magic of the spell, but they might be part of the mundane context of the command.
First, spells only do exactly what they say they do, and no more. If gestures were part of the magical command, they would have been included in the text of the spell. Specifically, the one-word limit reduces the spell's versatility--adding gestures basically bypasses that limitation.
Second, the spell only requires that you can see the target, not that the target can see you. If you try to use gestures to Command a creature that can't see you, does it still work? Nothing in the spell text says that the creature can somehow understand a gesture it can't see, because gestures are not part of the spell.
However, creatures have to use mundane, nonmagical context to interpret the command that they're given. For example, "approach" means that the creature has to locate you and figure out how they're going to move closer to you, and "drop" means the creature has to identify whatever they're holding and drop it.
If you issue the command "exit," and point, the creature may use the information you give it in order to carry out its command. However, they are not magically compelled to do anything other than strictly follow the single word command, so they might exit via other means, like teleporting away.