Ninja looting has become a rather big issues full of excuses. Mainly "for my companion", which is complete out of the question.
So here,s a suggestion: The loot that drop, make it non-needable for characters whom the stats wouldn't benefit. As an example, a piece of gear with Cunning on it drops, people who wont benefit from Cunning will only be able to greed on it.
That way, it'll solve the ninja looting issue.
But then you have a class like the bounty hunter where three of its five companions use aim and the smuggler where two of five use cunning.
I agree that "ninja looting" is a problem but your solution is a non-starter.