It is a test of morality- Asgardian morality. Only a worthy warrior by Asgardian moral standards is fit to lift it. Remember, Cap is a soldier, a warrior who has killed people in battle when necessary. Mjolnir judges Cap on those Asgardian moral standards- on his nobility (in the moral sense, not in the genealogical sense). I can easily accept that Cap meets the Asgardian standards of worthiness.
Worthiness has nothing to do with lineage, otherwise Beta Ray Bill and other worthies couldn't lift it.
I agree with your criticism and analysis of Vision lifting Mjolnir. I think he lifted it like an elevator can "lift" it. Mjolnir wasn't judging Vision's worthiness. It also wasn't bestowing any powers onto Vision. It was considering Vision to be an object, not an entity. Though really I just think it was a bad decision by Whedon. Really, I don't think the MCU did a good job with Vision. He just sort of appeared 2/3rds of the way through AoU and was mostly in the background until the end of Infinity War. But I've never really cared about Vision in the comics either, so that might be skewing my view somewhat.