

The Constitution leaves what happens if the Presidency and VP are both vacant at the same time up to Congress, and Congress has passed various Presidential Succession Acts, the most recent being 1947. The language in that Act specifically exempts anyone who would otherwise be ineligible from becoming President.
https://en.m.wikipedia.org/wiki/Presidential_Succession_Act
And this has been enforced in the past; Cabinet Secretaries who were not natural-born citizens have not been included in the succession list. I remember specifically that when Madeline Albright was Clinton’s Secretary of State, she was not on the list because she was born in Prague.
The Constitution left the matter of Presidential Succession up to Congress, and Congress set it up in the Presidential Succession act. That act includes clauses that say it only applied to those “eligible to be President” and not to those who have a "failure to qualify* for the office.
So, simply putting Trump in the line of succession is not enough to get around the Constitutional bar on a third term. He would still be ineligible. There is precedent to enforce this, too: there have been a handful of cabinet secretaries over the years who were not natural-born citizens, and they were not included in the line of succession. Madeline Albright is the one I remember; she was born in Prague and was not eligible despite being Secretary of State.
With all that said, succession is determined by Congress and I suppose they could just pass a law to do whatever they wanted. They’d have to blow up the Filibuster for it. Would they? It would surely get challenged in court but even if the Supreme Court disallowed it, would Trump listen? The Court would need to find a way to enforce it.