That question is more about current POTUS then former but for the most part yes they are? The position gets away with a lot of things that are of shall we say "questionable legality". If you want one example you can look at
Obama drone striking an American by accident while trying to get his father, who he had
ordered to be drone struck without due process. Now said father was a terrorist but that's still not exactly legal even if they claimed it was after the fact. And that's an example that's not even the subject of contention.
Your main recourse for justice is impeaching them during their term in office and that requires a pretty substantial fuck up to go through. Aside from that though you don't actually have much ways to bring a president to task, in part because the executive tends to require some amount of leeway in order to govern effectively.
As for former POTUSes now you're in the aforementioned issue where every person now serving as president has to keep looking over their shoulder out of concern that his successor might decide to use anything he does as an excuse to jail him which will stifle their ability to actually do their job.