A lot of classic sci-fi adresses some of those issues, but of course that's just fiction, not a scientific analysis of any sort. Asimov did create the so-called laws of robotics, but those don't actually work correctly, even within his stories. Sci-fi is more about problems and failed utiopias than sollutions overall.
If you've somehow never read any of it just start with the big names, like Dick or Lem.