Many other countries have Gendarmerie forces that bridge this gap in various ways. The most famous being the RCMP. Other countries mix these responsibilities with varying success, but they do it intentionally. Some have found good success with it.
https://en.wikipedia.org/wiki/List_of_controversies_involvin...
There were plenty of countries where gangs possessed and used automatic weapons, from Scandinavia to Germany, from Brazil to former Soviet Union. And that is not even touching Africa. A gang with machine guns is not a reason to ask military to take over law enforcement. My 2c.
The murder clearance rates are low, corruption seem to be persistent problem and actual police work does not actually seem to involve attacking actual super armed gangs.
What country do you live in where there's no need for SWAT-like teams or a straight-up Gendarmerie?
The issue with catching organized criminality is in investigation and dealing with corruption - including police corruption. The whole need to shoot out with them thing does not happen unless the local police is spectacularly bad.
Maybe if you have criminal activity at the level of needing automatic weapons, then you need military intervention and not police.
As many ex-military have pointed out in various forums, even in war situations rules of engagement for soldiers are very clear and strict, which is not true of most police. Soldiers are trained to deal with situations where lethal force and high power weaponry are assumed standard.
Police, if they are really to protect and serve, and act as part of the community should be dealing with an entirely different set of tools and skills. A solider and a police officer should be completely different roles. The former should be an expert in using state sanctioned violence to deal with high level threats to public safety and the latter should be a member of the community with the ability to resolve local conflicts and enforce standards agreed upon by that community.
You can't reasonably mix these two responsibilities and expect good results.