I don't understand how this hasn't gotten more attention throughout the years. I would like to learn about why that is.
I am a big fan of Squash and Merge but it's saddening that users have to configure that by hand on a repo when they first merge a commit via the GitHub UI, as many people aren't aware or don't think about it which can lead to nasty commit histories.
Every couple years I go through the exercise of trying to find the right solution like d3.js, mermaid, or dot and graphviz to automatically generate diagrams like you're creating here. Every couple years I continue to be disappointed.