Asking previous employers about their experience with an employee, however is not illegal. It's usually not illegal for them to say something negative if it's true, though some businesses are conservative about what they will say out of fear of being sued for slander. Accessing public court records or news stories about criminal cases and using that information for employment purposes is usually not illegal. Asking prospective employees if they've been convicted of serious crimes is usually not illegal.
It does seem to be conventional to include one's photograph, age, sex, marital status, children or lack thereof and place of birth on a CV in Germany. It's not clear to me if it's actually problematic to exclude those, but it's my impression that not following conventions tends to not go over especially well in Germany.