I worked for a Germany company and a similar question came up. An HR member (not a lawyer) mentioned six years for the average Joe though on some special situations (banking industry or some health/government jobs can have ten years). This is specific to salary slips and anything directly related to it to assist with tax audits.
Emails and documents that you created for the business belong to the business. If you were employed to write instructions on disaster recovery for example, just because you left, it does not mean they need to get someone to re-write everything.
Private/personal emails or other stuff on your company laptop falls into a gray area. If your work contract said you could or could not use email/web for personal usage for example, or if you were in sales, and were in regular touch with the outside world, a combination of private comments might be contained within professional emails based on work relationships you had built up. It is less clear on how this is controlled.
A Company does not have to give you a positive work reference (nor can they give you a bad reference). I believe the most they are required to do is confirm if you worked there or not. How long they need retain that piece of information is also not clear.