I think that immunity for explicitly delineated powers makes sense purely from a logical point of view: the constitution says the president can do a thing, therefore a law saying they can’t do that thing is either unconstitutional, or doesn’t apply to the president.
You are effectively implying this, but I will say it explicitly - you don’t need immunity to reconcile the logical conflict. The courts can simply find that that law is unconstitutional facially (if it is specifically directed at an enumerated executive power) or as-applied (if it is a general law that sweeps in executive conduct that falls under an enumerated power). In other words, it’s not that the President is immune from criminal prosecution for violating a criminal statute, but instead Congress violated the separation of powers when passing the law and it therefore can’t be enforced because it is unconstitutional. In that situation, this would be a defense to the prosecution, with the burden being on the President to raise and prove the unconstitutionality of the law just like any other defendant. We don’t need to invent a new immunity to protect the President against Legislative excesses.
Yeah, that’s fair - ‘new’ is probably not wholly accurate.