I am a huge Pathfinder fan (check my home instance) and have played both games.
Tl;dr, play Wrath. The plots of both games are standalone.
I hated Kingmaker. Incredibly frustrating experience. The game is difficult, buggy, the writing is beautiful in places and baffling in others, and the kingdom management is balanced poorly. It's easy to get yourself into a death spiral on kingdom management that takes 50 hours to play out (which then gives you an instant game over).
However, Wrath of the Righteous is one of my favorite CRPGs. I have roughly 200 hours in it. The writing for companions is much better in this one and while the army management side game still isn't good, it is a lot less frustrating and opaque than the kingdom management mini game. There are still some bugs... I had one game-breaking bug where I had to install a mod to teleport out of an inaccessible area after the game deleted an elevator. My only other complaint is that the ending was clearly rushed, but the campaign is about 100 hours and most of it is of excellent quality. Overall it's very worth it. The different mythic paths have tons of interactivity in the world, so it really changes each playthrough when you make different choices.
Also kudos to Wrath for well written evil companions and choices! You can be a psychopath that kills everyone you come across if you want (and there's even a mythic path tailored exactly to that), but there are also more subtle choices that allow you to twist the crisis at the Worldwound to your advantage (try Lich!). It is still satisfying to be a big damn hero, too.