I feel your pain and have experienced the not so Smart App myself. One thing that is notable on the HP printers that I have set up is that they have issues with routers that have Dual Band for 2.4Ghz and 5Ghz Wifi. The HP printer is only capable of maintaining a 2.4 Ghz connection, so what I did was create 2 WiFi networks, with one of them only being 2.4Ghz. I called that "Network", and then created my other 5Ghz network and called that one "Network 5". The names don't matter, I just wanted to designate one on them as being a 5Ghz network.
I connected the Printer on the "Network" Wifi and joined that Network on my Mac to add the printer. After it was set up I was able to print and suprisingly after changing my Mac to "Network 5", it continued to print even though the Network names were different from the Printer and the Mac.
Not sure if that is possible with your router or if I was just lucky and it happened to work with my router, Have not had a problem since and my printer is still connected to the 2.4 Ghz "Network" and my Mac is connected to the 5Ghz "Network 5".