However when I try to figure out when the team should estimate the backlog items according to the Scrum Guide I can’t find an answer on that. For example it states that the product backlog is input to the planning meeting, it also states that the product backlog contains estimates. This would mean that the estimates should be done before the planning meeting?
I don’t think you should interpret the Scrum guide like that. What is described in the guide is like in different stages.
Obviously the very first Product Backlog consists of Product Backlog Items, prioritised, not estimated and serves as input for the Sprint Planning Meeting. During the Sprint Planning Meeting, the team starts estimate the items one by one.
What is state in the guide as “the product backlog contains estimate” that is true, BUT at a certain point in time…
However I guess this is up to the scrum master based on different scenarios when the estimation takes place.
Theoretically it's not up the Scrum Master to decide when the estimate is done. Estimating is a part that is embedded in the Scrum process. (either during the Sprint Planning Meeting or Refinement session) Yes the Scrum Master can initiate these meetings, but theoretically it’s the PO responsibility. I like to emphasis this part because that’s something that’s not according to the Scrum guide. Personally I don’t believe the PO should or can always be responsible for the “project management” part. Basically what the theory tell us is “it is the PO’s product (and money) so it’s his/her responsible to monitor (manage) the project. I believe, depending on the organisation and type of PO, the Scrum Master can also be responsible for this part. But again, I don’t always apply this thought…
The guide says "Product Backlog refinement is the act of adding detail, estimates" and that it is a ongoing process, which supports my theory that it is up to the scrum master when the estimation actually takes place?
The Backlog Refinement session is indeed an act of adding details, estimations etc. Please note that this is an ongoing process so in another words, include it in your weekly even by (for example) sending weekly invites for these sessions. Either the Scrum Master or PO can initiate these sessions.
Scrum Master because he is the guardian of the Scrum process.
PO because it is his/her product and a refinement session can certainly help the PO refine his items. Perhaps also re-prioritise and/or re-estimate the items.
This will all affect the overall planning which is again very crucial for the client.