well, if you want to route the LON-CGN via FRA you won't get any extra BA or AA miles anyway... only LH will go there, but you can still earn extra miles when flying direct from LON to Cologne.
Just book the first part of the train journey from cologne to nuernberg up until FRA airport train station as a "Lufthansa flight" and continue from there to Nuremberg. YOu will probably have to change trains in FRA though, but you won't loose much time.