In canon you see a ship jump into hyperspace from within a planet's atmosphere, and thus well within its gravity well in The Clone Wars season one episode Jedi Crash
In Legends the planet Pammant was effectively destroyed when a Republic warship accidentally jumped to hyperspace and crashed into it. I'm wondering if something like this is how Anaxes was destroyed in canon but AFAIK that destruction has not been explained,
Navsystems and starship sensors come equipped with safety systems to prevent such accidents and that is Interdictors do. They cause the sensors to believe there is something nearby making it dangerous to enter or travel through hyperspace which triggers the safties to either drop the ship to realspace or prevent the jump.
I don't recall the hyperspace jump in Jedi Crash and as some of the worst episodes in the series, I don't feel like re-watching them. I would be slightly surprised if it was as clear-cut as you say but I'll leave that to someone who has seen it more recently. But given the argument appears to be stemming from this idea that you can cause massive destruction by hyperspacing into a planet, it makes you wonder why, if that were true, you have old-fashioned bombing raids, etc. Every X-Wing, Millenium Falcon or junk freighter would be a devastating weapon of war. Not to mention why actual weapons of war wouldn't be designed on that principle. It makes one immediately wonder why they would bother with a trench run and the highly difficult shot of getting the photon torpedo down the exhaust port when I'm sure the rebels could have found one in their number willing to bring their X-Wing out of hyperspace in the middle of the Death Star. Or gotten R2-D2 to do it if they didn't want to lose any lives. What you're hypothesizing here doesn't seem to fit with the universe as portrayed, imo.