The risk isn’t all that great and becomes even less as police become educated.
Here in Michigan we can open carry right in the state capitol with no problem.
I do not know how the risk of being attacked by police for legally carrying a firearm compares to that of being attacked by unauthorized criminals. I do know that it has happened many times.
A lot of risks aren’t “all that great”, but are easy to avoid. I do not care to place my trust in the education of any policeman whom I do not know, nor do I consider it my business to educate police or the general public.