Dynamic postCpLoginRedirect based on user permissions
You don’t need to dynamically set the postCpLoginRedirect template, you can point to a single, unified template. Once the user has been redirected, make all of your dynamic decisions within the Twig template.
If you want to then choose to redirect to yet another template, just use the Twig redirect tag.