In theory, you can't employ someone in Germany for longer than 18 months via an employer of record. If you want to employ someone for longer than that, you must have a German legal presence. This is one of the ways that Germany ensures that employee rights are actually enforceable.