Humans are terribly flawed. Their ego makes them compete among themselves even against their own best interests and the best interests of their offspring, which should be their most precious gift. Just a very simple intellectual understanding of our ecological habitat should make every human at least a mediocre custodian of the planet and its resources.
It is NOT our intellect that is flawed but the fact, as a species, our ego suppresses, deludes, misleads, and deceives the intellect of ourselves and others. Clearly our intellect can understand sub-atomic physics and create machines to fly to the moon so the problem is not a lack of intelligence. To be fair it is not 100% of our species that are so ego driven but the numbers do appear to be in the majority. But maybe that ratio is misleading. Like many statistical populations that are represented by bell curves it is possible to shift the peak of the bell by marketing, manipulation, and outright lying. I would propose the worst egos probably have had a significant negative effect on the masses.
You could say that maybe the worst has happened since the beginning of the industrial revolution but recorded history has many documented cases of giant, reprehensible, and manipulative egos doing extraordinary damage to humankind and the environment. The industrial revolution, social media, the Internet, et al. has more likely leveraged the ability of these egos to do damage. This coupled with a population explosion in the last century makes the likelihood mass human extinction will occur. Maybe not all humans but large numbers of humans.
Mother Nature will follow her natural laws and adjust the number of creatures, including humans, on the planet. Hopefully humans with reasonable egos and large amounts of empathy will be the ones that survive. If not then those aliens that visit someday in the future can say “I told you so” but of course there will be humans to hear it.