A6 and A7 on ATMega328 TQFP question

Or you could move to 328PB - that one has proper pin drivers on those pins. And IIRC it has 2 more pins too (they replaced a Vcc/Gnd pair), and more features.

I think Minicore supports it, though there are still some complications...