FFXII is a flawed masterpiece. It represents a path not taken by Squenix after they forced Sakaguchi out of Final Fantasy, one that would have seen the series emphasize mature storytelling and a non-linear world. Sakaguchi himself clearly treated Matsuno as his protégé, and I think that this path would have helped FF maintain some of its relevance if they'd followed it.
Squenix under Wada decided to double down on the adolescent anime style that the anti-Sakaguchi devs had been pursuing with VIII and X (and especially X-2), however, and recent installments like XIII and XV are as a result repulsive to anyone with good taste and a brain.
The main flaw with XII is that Squenix forced Matsuno out at some point in development. As a result the first half or two-thirds of the story is much more coherent and skillfully told than the ending, which degenerates pretty sharply. The presence of non-entity Vaan as "main character" is also the result of Squenix's meddling - Matsuno's original plan had been for Basch to be the main character, which would have resulted in a much better story.
What Squenix wasn't able to sabotage is the huge scope of the world. I think XII may have the largest, most impressively detailed world of any Final Fantasy ever. It's certainly a change of pace from the hyper-linearity of X and XIII. In some ways it was trying to do an open world RPG on the PS2, sort of like Dragon Quest VIII at the same time.
You already hinted at this, but FFXIII is basically a spiritual sequel to FFX, which was created while Sakaguchi was still there. Nothing about it is anti-Sakaguchi. You know he was there during FFVII too right? Anime is not some anti-thesis to Sakaguchi, and suggesting that it is the case is rewriting history a bit. FFIX was also pretty anime as well, and more childlike than anything in FFXIII. FFVIII also is fairly anime-esque. The Last Story is also pretty anime-ish.
If you don't think the FFX team would have a greenlight to try their hand at a new game after the success of FFX, you're kidding yourself. What hobbled FFXIII was PS3's development architecture being extremely difficult to work with (Valve famously said they were not putting anything on PS3 for a while, and eventually changed their mind). This was also happening at the same time that they were developing HD art assets for the first time, and dealing with the explosion in team sizes and budgets that came with it. This hobbled most Japanese developers for that entire generation, and that was when the western game developers shone the most, during 360 era.
In reality, its actually remarkable that FFXIII came out in the state that it did. To this day, its one of the most visually impressive games on the whole system, and looks stunning in 4K, had basically zero glitches, and also had one of the best and most mature OSTs in the entire series. The story is actually extremely dark and mature. The battle system is an evolution of FFXII, with the gambits being auto-programmed into the stances/jobs, keeping the strategy from XII but giving it a bit more player participation and action feel.
Then, FFXIV collapsed under the weight of its own development and launched in a broken state on PS3, as their first HD MMO. Then FFVersusXIII was so troubled in development that it couldn't even get off the ground without a complete relaunch and didn't even make it on PS3 at all, and had to get a new director. Even after skipping a console generation, FFXV launched in rough shape and didn't generate enough fan interest to even maintain DLC releases.
The only thing that even kept SQEX alive at that point were FFXIII sequels that were developed on PS3 with difficult architecture, on time and on budget. The FFXIII team saved SQEX during one of their darkest periods. Now that is the team putting together FFVII Remake as well. It's basically their best team.
Matsuno failed to complete production as director of FFXII. Wikipedia says that key staff left the project during development and he resigned. Nomura also couldn't even complete FFVersusXIII.