They'll be useless, or as close as possible to it, for mining as long as they can't break even with respect to cost of purchase, energy usage and mining production. APUs, unless they get some sort of integrated memory that is larger than the DAG, will not have sufficient memory bandwidth to compete with any dGPU, so long as their memory bandwidth is below 200GB/sec. The only APU that theoreticallymight be in danger is the M1max, and that's trapped in the Apple ecosystem. Infinity cache won't really put APUs in danger either.
On top of all of that, you have to deal with the cost of thermal management. Using an APU for mining will generate a lot of heat, which will need a solid heat sink as well, which will also add to break even cost.
AMD, if they chose to, could make an APU that was essentially a 5800x, with 64MB of stacked cache to operate as an infinity cache and a 20cu RDNA2 iGPU with quad channel DDR5 memory controller with only four actual dimm slots to keep board costs down and sell every one that they make at $200 over what they charge for the 5800x now. That would be a perfectly competent gaming solution for high quality 1080p gaming for 90% of the market. They won't, of course, but they could. It wouldn't even require developing any new IP, save for a socket. And, as a bonus, even after all of that, it wouldn't be interesting to miners because, even with quad channel DDR5, it would still suck at mining.