Yes, I think I understand now, and have another suggestion or two, which again may be "not precisely" what the OP wants, but may work nonetheless. (I haven't read the link provided by colucix, so it may well provide exactly what you want).
1) Look into the `set` command. I believe `set` can be used to set aspects of bash, or things running within bash, including re/direction for the duration of a script or bash instance.
2) Put all the code that you want re/redirected, into ONE script, and then, execute THAT script with
./script | tee 2&>1
3) put your stuff that you want re/directed, into a FUNCTION, or between
{ } braces, and subsequently re/direct the function call or
{braced code} into the `tee` command.
Anyhow, these are just ideas, which work for me in various circumstances, but again, might not do precisely what you want, in your specific case.
If the link provided by colucix
does give the answer you need, please enlighten us, so we'll (or for myself anyhow) know in the future
EDIT -- new posts above/below

-- hopefully you get the
named pipe to do what you want; please show us how, when you get it sorted!
Regards,
Sasha