I'm not sure about the specific constellation that you are interested in, but the first point to go to would be the personnel department at employer 1. If this is a public institution (university, research institute, or the like) they should have some guidelines about side jobs (Nebentätigkeit) that you need to follow. The specific regulations may depend on the type of your appointment (TVÖD, Beamter, ...). If this is a larger institution you can probably find the applicable guidelines on their intranet (possibly in German only).
If everything works out with employer 1, you also need to check with employer 2 which regulations apply.
For professors at German universities, side jobs are generally possible (subject to specific rules) and are being used. I know cases where the side job was in industry or other universities abroad. I don't personally know of a case where the second employer was another German public institution, but I think it should also be possible.