I view writing in darker themes as just being honest about the world. It's nice to have power fantasies or light fluffiness, but it's always the ones that go dark that are able to make people think, make people examine themselves, and put out the important social commentary.
Dark writing always requires honesty, because if you try to go down those social commentary roads without really understanding the issues or you are trying to push some agenda your lie will be incredibly transparent just due to the nature of the dark genre. It has a way of making those lies stick out.
Really, what you are doing when you are writing the darker genres is you are writing a nightmare. A nightmare is a type of dream. A dream is the way in which your brain attempts to interpret the world by stripping away all the specific minutia that bogs us down and prevents us from seeing the truth. Instead, it gives us an interpretive view that strikes so much deeper at the core issues of the world that you are forced to look it in the face.
In my own series, I have decided to give my characters a completely overpowered set of abilities, and then repeatedly throw them into situations where power is absolutely not the answer. I give them exposure to intractable problems, like racism and this world's equivalent of Israel Vs. Palestine. Issues for which using the powerful abilities they have will either make them become hated, cause the problem to become far worse, or both at the same time. Very similar to the US trying to solve the world's problems. They are a super power in this world, but that doesn't let them solve these complex problems, and every answer they can possibly think of is wrong. The idea is to write it such that the reason why the reader identifies with the characters is because they are left every single bit as unable to figure a way around this problem as the protagonist cast of the story is.
I do not give easy answers either. The entire point is that there really is no solution, so the main cast just needs to find a way to live around it even though it's causing them a huge amount of strife.