Assuming Astras are a similar setup to Omegas, that picture looks very much like the central locking micro switch on the back of the exterior door handle bracket, which I have never had any issue with at all, rather than micro switches in the solenoid / motor itself. Usually the random locking and unlocking is due to a fault within the solenoid / motor itself, which I have had problems as you describe - the faulty solenoid is generally the one that doesn't lock or unlock (funnily enough
). Personally, I'd visit your local breakers and for little money, arm yourself with a couple of solenoids, and try them on your own car to ensure they are working correctly before reassembly. I've just replaced the complete central locking solenoid / motor previously on several of my Omegas (in fact, just done one a couple of weeks ago with one sourced from a breakers) when they have been playing up with ones from scrapyards, rather than messing about trying to repair the old ones.
No doubt someone with better knowledge of Astras (dave the builder?) may be able to enlighten you further?