Bro you went 2nd order before visiting first order thoughts.
First thing that you need to think about is why we build products? For other humans! To help in one or the other needs that these humans have. The day AI can understand human needs and emotions, we would have created an ultron equivalent. It’s endgame then.
Rest assured every new tech brings optimisation. But there is not a limited set of jobs, else from the farming age population we wouldn’t have evolved till the digital age. Imagine YouTuber, social media influencer as a job. Did it exist 15 years back? Humans and the way they interact with the universe will keep evolving and we will keep inventing new jobs and businesses. We are intelligent monkeys entertaining each other, while ensuring survival. This will continue till total annihilation of the species or the environment.
Relax about job losses try to do the best (enjoyable, good financial rewards and fulfilling) work you can, keep learning and growing as a human first and a professional second. Enjoy the ride!