> but it's trivial to get a bogus reference in C++
How? Honestly curious. (You can certainly reinterpret_cast something and ignore all warnings, but is that all?)
From 2008, but still applicable:
https://nealabq.com/blog/2008/09/15/bugs-returned-mem-refs/
As for smart pointers there's a lot of domains with tight performance requirements where you can't afford them - and to be quite frank, if you can afford to use shared_ptr you can also afford GC, so just use a sane language