How to avoid evaluation into the global space when the expression is not know in advance

Yes. They can be any combinations of elementary functions.