This is so much like my dive in to Blender. Right away I couldn’t stand how clunky selection behavior was in general so I set out looking for way to make it behave in a way that felt more intuitive and comfortable to me. I ran in to a lot of the issues you’re talking about where just getting Blender to tell you what’s selected became a massive headache.
I basically started writing my own selection operators in python and got decently far along before 2.8 came along and broke all my scripts. I started re-writing them for 2.8 but then they’d get broken again.
Then I realized that writing these operators for objects and bmesh was not enough because there’s completely new operators for every different object types like curves, lights, armatures. Nothing’s unified. And behaviors are inconsistent from one object type to the next.
It became such a massive undertaking I just gave up.
Here’s some of the progress I made with a few places I wound up finding selection code to try and study:
https://blenderartists.org/t/object-selection-accuracy/689986/2
And here’s another thread going over some of the hoops you have to jump through to get bmesh selections if you haven’t seen it already:
https://devtalk.blender.org/t/foreach-get-for-selected-vertex-indices/7712/19