I would try to avoid having, at any point, another FF number in your booking than the one you want to earn with. Chances of you being unable to correctly remove it from the booking (just before the flight) are simply too great.
Usually you should be able to just show your (gold) card to get access to the lounge, and so on. Yes, they may make a remark that it doesnt match the booking but normally it is no problem.
Another way would be to not have any FF number in your booking. Then just retro-claim back the miles after the flight, to the program that you like.