The majority of main cities I have been to have locker services at public transportation hubs (airports, train stations, bus terminals). Berlin is no exception.
The ones that I used in Amsterdam, Berlin, Prague and Amsterdam seemed very safe to me, and I would expect nothing less than perfect service and safety from a main city in Germany. When possible, I would recommend using the services of a company that is operated by the country, rather than privately owned.
Here is some information on this service in Berlin.
It's worth to keep in mind that some hotels can store luggage, although I'm not sure whether this also applies to extended periods. If you're staying at a hotel, it may be worth to ask.