Assuming the onward LIN flight is BA in CE, then yes you should have Galleries lounge access before that flight (unless you have Gold status then you have FLounge).
As for leaving LHR on arrival for the outside, yes it’s something I often do if I have a longish connection - just follow arrivals rather than connections and you are out. If your bags are not checked through you’ll need to collect and re check in upstairs, and yes you’ll have the pleasure of security again.