Nope not at all. The issue comes down to defining what is hardware and what is software and what defines the link between them. Patenting the software that is directly linked the functioning of the hardware, as you describe above makes sense.
But just look at some of the Patents in questions. Take U.S. Patent No. 10,176,848 as an example. The problem is well understood, you want to identify faces in a photos and videos and the patent envisages a software that would do this. But come on, do you really think this should be patentable from a software vision alone? My iPhone identifies faces, my video editing software does this, my EufyCam security cameras do this... why doesn't Maxell just take the whole world to court.
My post is not a defence of Apple, who are just as much to blame for patenting software and software features.