So the only way to prevent such security exploits is by preventing copy-paste compatibility with C, which C++ sadly cannot do without breaking backwards compatibility.
You can see this happening across all desktop and mobile oriented OSes, where both C and C++ have been reduced to high performace low level OS layers, with userspace migrating to something else.
Microsoft is the only vendor left on OSes for the consumer space that still cares enough to support C++ on their UI toolkits.
"Swift is intended as a replacement for C-based languages (C, C++, and Objective-C)."
Taken from https://swift.org/about/
"Swift is a successor to both the C and Objective-C languages."
Taken from https://developer.apple.com/swift/
Launchd, dock were announced as rewritten at WWDC 2017, the new XCode build system and instrumentation at WWDC 2018, and it will continue little by little.
Naturally it won't happen overnight, but Apple isn't known to endure Python 2/3 scenarios for that long.
At WWDC 2017 they mentioned that launchd was fully ported. The video is available.
The reason is that the modern C++ is perfectly suitable for high-level programming -- on par with Java, C# or Visual Basic. No "taming" is needed.