This answer will focus only on transiting through Frankfurt.
The Ministry of the Interior has a handy FAQ list that includes the question whether transit through Germany is permitted:
Transit through Germany to travel to another EU member state or another Schengen member state
Third-country nationals may enter Germany to travel to another EU member state or another Schengen member state as their country of final destination if the following conditions are met:
- the traveller remains in Germany (as country of transit) only as long as absolutely necessary to travel directly to the country of destination or another transit country;
- the traveller is permitted to enter the country of destination or another transit country (in accordance with Annex I or II of the Council Recommendation of 30 June 2020 or with individual confirmation of permission to enter issued by the country of destination).
Under these conditions, third-country nationals may also enter Germany
by air and travel overland to their country of destination.
The third-country national must provide evidence that the conditions listed above have been met. Airline or other travel tickets, etc. may be presented to meet condition (1). A printout of the current national regulations in place in the country of destination implementing Annex I of the Council Recommendation may be presented to meet condition (2). It must be clear from the text that residents of certain countries are not required to provide proof of the reason for travel to the country of destination. If this is not possible, then evidence must be provided of the urgent need for entry in accordance with Annex II of the Council Recommendation. Germany’s border control officials will only check for compliance with the requirements for entering Germany. Alternatively, the traveller may present a document issued by the responsible authorities of the country of destination certifying that entry restrictions have been waived or that approval of entry has been granted.
As usual, a passport of the country that is your final destination will in all circumstances be sufficient to prove you are entitled to enter that country.
This leads us to the question of whether a Covid-19 test is required to enter. The current rules of Germany are laid out in the Corona-Einreiseverordnung (the long title roughly translates as Ordinance to protect against infection risk connected to immigration due to SARS-CoV-2 after declaration of an epidemiological situation of national importance by the German Bundestag). As far as I know, the legal text is only available in German but here is what it says with respect to cases like yours:
§ 1: (essentially, everyone entering Germany from a risk area as defined by the RKI (list is in German but the page contains a link to an English-language PDF) must fill in a digital notification of entry on www.einreiseanmeldung.de).
§ 2: (1) §1 does not apply to the following groups:
- people who only transited through a risk area without stopping
- people who are only transiting through the Federal Republic and will leave it in the quickest way possible
- and following: (n/a to you case or anyone on Travel.SE)
(2) exceptions according to §2 (1) are to be demonstrated to the relevant authority, the travel operator or the immigration personell on request.
[(3) concerns an exception that does not affect anybody on Travel.SE]
(4): The aforementioned exceptions in §2 (1) do not apply when travelling from virus variant risk areas (currently Brazil, Portugal, the entire UK, the Republic of Ireland, South Africa, Eswatini and Lesotho; subject to change; listed by the RKI in the link above).
§ 3: (essentially, you have to get tested for the virus; either up to 48 hours after arrival or – if arriving from high-transmission or virus variant areas – within 48 hours of but prior to arriving at the border)
§ 4: (1) You are exempt from the requirement to get tested within 48 hours if an exception of §2 (1) applies to you and you are not required to present a test certificate on entry.
- As it stands, nationals of another EU country can enter Germany (and thus, Schengen) at Frankfurt airport for transit.
- Transiting passengers who have been to an area defined as a virus variant area within 10 days prior to arrival must fill in a digital notification of entry and have a negative test certificate on arrival.
- Transiting passengers who have been to a high-incidence area within 10 days prior to arrival must present a negative testing certificate on arrival but need not pre-register online.
- Transiting passengers who visited risk areas within 10 days of arriving are exempt from the above requirements but need to be able to prove they are leaving Germany in the fastest way possible and that they are permitted to enter their destination.
- Transiting passengers who have not been to risk areas within 10 days prior to arrival are free to go.
Note that airside transit counts as having been in a risk area.