I think the answer to your question is any or all.
Many bands will go to a specific record producer or engineer or studio based on personal abilities/experience/reputation and then place their trust and reliance on the person to do their job. However, some bands will want greater control during production and can butt heads with their producer as to what the final sound will be. Sometimes it's even a three way fight between two strong willed band members with the producer trying to broker something between the creative tensions of the band.
The record companies' role is more indirect and in the interest of marketing/sales. They want something that will sell. They will put pressure on both the band and the producer to produce something commercially viable. However, I don't think they interfere too much during actual production. They come into play in the beginning in deciding whether to sign the band, and after, in deciding whether to keep the band or what effort they put into marketing.
As to what is happening with the Metallica example, I have no inside knowledge of the dynamics going on in that case.
I think it's an interesting speculation that modern thinking copyright holders will be exploring new avenues of marketing/distributing their products such as through downloads. Many bands that do not have major record deals or are having difficulties with their labels are exploring direct marketing of their creative efforts through the internet. It seems to be that it is the record labels who are having difficulties making the transition to new, emerging business models. For this reason, it may be the artists and producers who are leading this shift, with the stuffed shirts in the record company executive offices slowly being dragged into the new technologies. All IMO of course.
It's an interesting business to work given the evolution that's occurring.