Pretty much none of the above. UA and LH are in the same Terminal (2) ... read this thread ...
https://www.flyertalk.com/forum/unit...stics-lhr.html
Assuming your bags are checked through to FRA ...
Get off your UA flight ... follow signs for "Flight Connections" ... go through security ... proceed to LH gate ...
You will go through immigration, collect your bags and go through customs in Frankfurt.