The simplest(!) problem to solve before AGI becomes anything other than a civilizational footgun is "rigorously defining perfect morality." After that comes the task of programming something that we have very fuzzy, often misleading intuitions about (i.e. general intelligence). And programming it perfectly, of course, since any deviation from the defined spec will trigger the footgun. And since the thing will have to be able to self-modify, we have to assume an adversary who is by definition (likely orders of magnitude) more intelligent than you possibly trying to subvert said programming.
I find Yudkowsky's writing rather illuminating in this regard (for example, https://www.greaterwrong.com/posts/4ARaTpNX62uaL86j6/the-hid...) although he remains far more optimistic than I am.
We're programmers, considering the creation of what is essentially a god. As if an algorithm merely destroying a life through a bug were unheard of, or too small stakes.
Some interesting examples; https://docs.google.com/spreadsheets/d/e/2PACX-1vRPiprOaC3Hs...
One notable case from that file: 'A researcher wanted to limit the replication rate of a digital organism. He programmed the system to pause after each mutation, measure the mutant's replication rate in an isolated test environment, and delete the mutant if it replicated faster than its parent. However, the organisms evolved to recognize when they were in the test environment and "play dead" so they would not be eliminated and instead be kept in the population where they could continue to replicate outside the test environment. Once he discovered this, the researcher then randomized the inputs of the test environment so that it couldn't be easily detected, but the organisms evolved a new strategy, to probabilistically perform tasks that would accelerate their replication, thus slipping through the test environment some percentage of the time and continuing to accelerate their replication thereafter.'
An AI does not need to be malevolent - it merely has to be powerful and poorly aimed. The more powerful it is, the smaller the margin for error in the aiming. And with an "infinitely powerful" AI, we basically have to perfectly solve morality or else it will optimize for a future we do not want.
Things that it could probably do: Write song lyrics, screenplays, identifying drug dealers, things political parties can agree on, gauging your mental health similar to how Garmin watches can gauge physical health, finding MH 370, pass a typical tech interview.
Also if you play with AI as it stands today, you'll notice some characteristics. It reminds me a little of Vision in WandaVision. It's adorably naive in some things. It has a certain "dialect", probably depending on how it's trained. It reminds me of a 14 year-old American.