Does it make a difference if I bought my ticket from the operating or selling carriers on a United/Lufthansa codeshare flight if I want to upgrade to premium economy?
Yes! In many instances, and certainly true with United/Lufthansa, the operating carrier controls access to premium economy. If you want to confirm premium economy at the time of ticketing the ticket must be purchased from the operating carrier. Otherwise, you must wait until the time of check-in to upgrade and take your chances on the space not being available.