That photography, in general, is slowly dying.
Not a chance. Cameras are one of the most important features of cellphones to consumers. As long as there is light, there will be photography. There's an estimated 196 million photographs being taken every hour at the moment. Do you think that number his higher or lower than 5, 10, 20, 30 years ago? Do you think that number is trending up or down for the foreseeable future?
Now obviously most people aren't into the kind of photography that requires the kind of dedicated cameras we have, but there has never been a time where this is so much quality cameras and lenses available. We're in an absolute golden age of interchangeable lens cameras at the moment. You basically can't go wrong with any system. So while it might be a niche, it's a big and lucrative niche, and it's been a niche for pretty much all of photography's existence - with the exception of a number of years where compact digital cameras were ubiquitous (after the demise of compact film cameras, but before the advent of smart phones). But even during that time SLRs, DSLRs and SLTs were niche.
Phone camera tech has obviously come a long way, and clearly has taken over the snapshot market - and rightly so. And there's clearly innovations to come. But physics dictates the limits of what a camera in such a small form factor can do, and for everything else, there'll always be dedicated cameras.
And even AI and computational photography won't replace photography. Sure, phones (and even dedicated cameras) will use computational photography to enhance their images and features. And in things like advertising, no one really cares if the image is "real" or not.
But in general, what people really want to see is photos taken by people. There's a bit of a novelty factor at the moment where you could post up, say, a picture of an eagle in flight that was created with Midjourney or whatever, but that will wear off to a great extent. Most people interested in seeing pictures of eagles want to know that it was a real eagle.
I mean, for years now, computers have been able to beat humans at chess. But that hasn't killed chess, because most people who are into it are into it because it's human against human - it's about skill and ability, not computational power. The novelty of a grand master playing a computer has worn off, and certainly no-one wants to see two computers playing each-other (outside of the pure novelty of it).