It all depends on what you define by teaching, and especially what you mean by learning.
If teaching (and formal education) follows the classical paradigm (a way to create clones of a mold: nice uniform people that behave exactly as society has determined), then teachers can (and maybe should) be replaced with technology.
But it seems clear that the classical educational paradigm is no longer sustainable. People need to learn how to define their own interests (maybe someone thinks technology makes that with AI, but it really reinforces one interest in detriment of others), find the resources to dig deeper in those interests, be able to experiment (another thing not really promoted these days except if you’re doing it for a big company), share conclusions…
It is true technology and machines can give nice tools to support learning, can (finally) archive all knowledge in order to have it accessible (although Wikipedia shows us it’s not that easy). If technological tools are available to produce and access information, education can be focused on what it was meant to be: a way to facilitate people’s fulfillment by addressing their needs for information and skills having determined their own interests. And that’s the main point technology is way far to achieve.