OK. First, the sentence “The team, consisting of etc., etc.” is OK because the verb “consist” is a stative verb i.e. a non-action verb and indicates description or possession and, in general, stative verbs cannot be used in a continuous/progressive form. And in your example it is not used to describe an action, rather it is used to describe the “team”, unlike your second example in which you used a dynamic/action verb.
In your second example you are using a present continuous form of a verb, “working” with a past expression, “years ago” and therefore, incompatible. Would I understand what you meant? Yes. Is it grammatically correct? No. You could say, “The man who was working (past continuous) in this company years ago was found” to indicate that he worked for a period of undetermined time. OR, “The man who worked in this company years ago was found” to indicate simply that he worked there, also an undetermined time but maybe only for a day, a week, a year etc. OR, “The man who had worked (past perfect) in this company……” This example has the same meaning as using simple past. OR, “The man who has worked (present perfect) in this company years ago” (OK but I don’t like “years ago” with the present perfect. So, my ANSWER IS……..I prefer simple past or past perfect.
Finally, “The man who has prepared the documents is the firm’s lawyer” is fine. The documents have been completed and they were prepared by a lawyer of some previously identified firm. “The man preparing the documents…………..” The documents have not been completed. “The man having prepared the documents…………” In this example I expect that there would be some action on the part of the man but not a description of the man himself as "the firm's lawyer"----rather, for example, "delivered them to our office".
I know that distinctions and uses among simple past, present perfect and past perfect can be confusing especially when there isslight , or sometimes no difference in correct usage. Suggest you find a good reference to study the nuances among the forms. My "grammar bible" is "A Practical English Grammar", Oxford University Press but there are plenty of other good references.