>>1) I suppose that there is also a check of medicine like pills and lotions isnt it?<<
No, there is no routine check of medicine when boarding a flight or entering a country. It is something that 'could' come up if you come to the attention of the authorities either because a sniffer dog alerts to something or your behavior seems unusual or you're simply selected for a random screening.
If that happens, you need to demonstrate to the authorities exactly what it is you're carrying, that you don't have any prohibited items, and that any restricted items meet the rules for entry into the country. To prove what you're carrying, it's best if items are in the original packaging (either over the counter or prescription) and for prescription drugs, you have a copy of the prescription or a letter from the doctor explaining what you have and why.
>>a) The check takes place already in Germany, but also in the USA after the arrival?<<
Security on leaving Germany just cares about liquids, electronics and potential weapons, not medication (other than liquids or quantities so large as to be suspicious). Just make sure to put all liquids in the approved type of bag, and in the approved quantities. If you have liquid medicine in containers that are larger than the 100 ml limit (or the total is larger than the quart-size limit), put them in a separate bag and make sure it's labeled to be obviously medicine.
Customs on arrival in the US might question you further, as I mentioned earlier, if you draw their attention in some way.
>>b) I have got a signed confirmation in written of my doctor, that I need some medicine from Germany and by having it in my hand luggage I want secure to have it with me for sure. This confirmation includes both pills and lotions like for example against sun burn, mosquitos etc. Should that be fine?<<
Sun screen, mosquito lotion, etc. I don't think is considered as medicine and is still limited to the liquids rule, unless these are prescription items. In which case the doctor's letter should be adequate. If they're not prescription or specialty items, you can easily replace them in the US.
>>that the main luggage doesn’t get into the next plane and you cant pick it at the final destination. What about the current situation in the US?<<
Where is your first arrival (even if changing planes) in the US? That's where you will go through Immigration and Customs. And yes, it's possible that luggage doesn't get rechecked in time to reach the ongoing flight, but it's not as prevalent now as earlier in the summer, and was seldom as bad as Amsterdam and Heathrow. How much time do you have between arrival and departure for the connecting flights?
>>As a foreigner do I have be aware of anything when it comes to national flights within the US regarding checks etc. or is it covered by the security immigration check when arriving from Europe in Phoenix?<<
Once you land in Phoenix, any future flights within the US will be considered separate and you will have to go through check-in and security (including the liquid restrictions) like all passengers (including US citizens). You need ID to fly within the US, and your passport will be fine.
>>4) Is there anything else I should be aware of regarding your airport?<<
Not that I can think of. Arriving from Phoenix, you'll simply collect your luggage then make your way to your hotel. Maps of the airport are available online, if you want to see where the taxi line is located. Or the airport is pretty well signposted.
Flying back to Europe, check in 3 hours prior to your flight, then you'll go through security (subject to the same liquid restrictions) and wait at your gate. On arrival back in Europe, you'll go through your country's Immigration procedure, then Customs and then you're home.