I still wonder though how IFR really prevents mid air collisions in class G
It doesn't. Nothing does. Even a radar service doesn't guarantee traffic will be reported to you.
Your protection comes solely from statistics. The UK has seen about one VMC midair a year, and nearly all of them below 1000ft and usually in the vicinity of airfields. There is no known IMC midair since one in WW2. That's why I worry about flying low (and basically don't do it except for takeoff or landing) and couldn't care less about hitting somebody in IMC. Keeping away from glider sites is also a good idea. Fly above the clouds whenever possible; almost nobody does and gliders certainly don't (in the absence of mountains).
The UK probably has a similar traffic density to Germany, and vastly higher (10x to 100x) than most other countries in Europe. The #3 is perhaps France but most French GA activity is very low down, compared with the FL115 uppermost level available to VFR.
Even in controlled airspace there is no guarantee. Somebody could wonder into it non-transponder. If the CAS does not extend to the ground, the radar controller must assume the traffic is below the base of CAS (quite an assumption, eh?). Your protection in CAS is really from the lack of traffic (only about 1000 planes a year bust CAS in the UK) and once you are flying proper IFR you will be high anyway (say FL100 plus) and way under 1% of GA ever goes that high.