I would say that most of the "loopholes" that you're referring to aren't really accessible to the average Joe because most of us make what's considered "Earned Income". That's what your salary is considered and it's taxed according to your tax bracket. Wealthy people will structure their income and their holdings in ways to minimize the amount classified in the earned income bucket. The extreme is when executives take $1 salary.
The AI is going to be superior in terms of explaining which factors played in your return. This will become clearer how powerful it is when the application suggests ways to optimize your situation and you basically have a playbook in hand to use.