While you’d be placing this snippet in your child theme’s functions.php, the functionality of it really doesn’t have anything to do with the theme, and shouldn’t interfere in any way. The only thing I can think of is that possibly the iframe’s embedded map will not be responsive? — The example you’re linking to is not. Maybe when you embed your iframe, you’re able to give it a percentage for the width?
And I don’t see any security risk with that other than the fact that now users can put iframes within the tinyMCE editor. So, the security risk would just depend on what you’re including in an iframe, I suppose. But from the sounds of it, that’s not realistically an issue.