The captain of a merchant vessel flying the flag of the Federal Republic of Germany must be an EU/EEA national.
"§ 1 - Scope and definitions
(1) This Ordinance shall apply to the manning of merchant vessels flying the flag of the Federal Republic of Germany (ships).
(2) The following definitions shall apply [...]
3.  “Citizen of the Union” means a national of a Member State of the European Union.
To the extent that, in accordance with these Regulations, a citizen of the Union holds or has been assigned rights or obligations or that provisions are applicable which require the citizenship of the Union, a national of a Contracting State of the Agreement on the European Economic Area which is not a Member State of the European Union shall be treated in the same way as a citizen of the Union.
[...]
§ 4 - Master
Regardless of the gross tonnage of the ship the master must be a citizen of the Union. [...]" (Safe Manning Ordinance (18 July 2013; Federal Law Gazette I, p. 2575), last amended by the Ordinance of June 23, 2021 (Federal Law Gazette I, p. 1849), Sections 1 and 4 [unofficial English translation including amendments up to 9 June 2016 (Federal Law Gazette I p. 1350)])

Safe Manning Ordinance (18 July 2013; Federal Law Gazette I, p. 2575), last amended by the Ordinance of June 23, 2021 (Federal Law Gazette I, p. 1849), Sections 1 and 4 
[<a href="https://www.gesetze-im-internet.de/schbesv_2013/index.html">Ordinance</a>],[<a href="https://www.gesetze-im-internet.de/englisch_schbesv/index.html">Ordinance_Eng</a>]