When is it OK to cook a burger medium? When does it seem to be OK to eat burgers cooked medium and sometimes not?

I live in the UK and for many years it has been well-instructed that you cook your burger through to  ensure that any surface bacteria has been ground-in is killed. I have noticed that this has changed a lot recently and I have eaten in lots of burger restaurants who cook their burgers medium and never have any issues. In fact some of them are 5-star rated by hundreds of people online and you can never find a single review mentioning food poisoning. It's also a good point to mention that I also know loads of people who eat medium burgers without issue.

I know that in the rest of Europe they mostly eat medium-cooked burgers and have many French friends who admit to considering our roots of "over-cooking" burgers to be a bit weird and I kind of see the sense in that considering how much nicer a medium burger tastes.

I mentioned before that I know loads of people who eat burgers cooked-medium but I don't know anyone who cooks them medium at home and personally I'm too scared to-do-so.

Am I missing a crucial part of the grounding/cooking process, or is it just not as bigger issue as people once thought?

P.s. This feels like the sort of question that has already been asked so please do let me know if that's the case but I couldn't find it.
Beef has a firm, closed texture, which prevents bacteria penetrating far into the meat. This is why it's relatively safe to eat a rare steak: you kill the surface bacteria by searing it, and the middle is relatively bacteria free.

When you grind beef, you of course mix the surface with the middle, which increases the risk. To be safe, you should therefore limit the surface-to-middle ratio, ie use as few separate pieces of beef as possible.

Your average supermarket pack of mince may have any number of pieces thrown together, and so it's not a good idea to make a medium burger with it. The safest option is to grind your own beef, ensuring your equipment is very clean and your meat has been handled properly throughout its lifetime. I believe at least one UK gourmet burger chain grinds their own meat fresh daily. 

The other option is to use irradiated beef, which is virtually sterilised by being exposed to a burst of radiation. I'm not sure how easy that is to find in the UK, however.