My impression of Bolton is that he is a very intelligent, and extremely ideological, person.
He is not in the least partisan. Of course his ideology makes him align almost exclusively with Republicans, but I don't think he has an ounce of party loyalty. On a personal level, I cannot imaging him feeling anything but utter contempt for Trump. He generally likes Trump's policies.
Bolton is also something of an icon on right. Trump calling him a liar won't play well with some of Trump's biggest supporters in the "National Review" wing of the party, except it turns out that that wing feels the same way about Trump. They are aligned with Trump ideologically, but they hate him personally.
So I think Bolton is simply telling the truth, and he doesn't see it as stabbing anyone in the back. He's telling his story (for a profit) and if the truth ends up damaging someone, so be it. I don't think he feels any personal loyalty to Trump or the Republican Party.