The second scenario doesn't have enough information. To take an extreme example, if Reliever #2 entered the game with the bases loaded, allowed them all to score, got a strike out to end the inning, got 4 more strikeouts, but left the game with 1 out and the bases loaded, then I guess Reliever #3 was more effective. The scorer needs to take the entire game flow and context into account, so for us to second guess the scorer, a play by play history of the game is very desirable.
The rule is almost the same in college, except that if the coach announces before the game his intention to use 3 or more pitchers, then the pitcher of record gets the win, even if he is the starter who went less than 5 innings. I don't have access to minor league scoring rules, but perhaps there are similar allowances made when it is known in advance that the starter will go less than 5.
High school rules are more different; the starter only needs 4 innings, and if the game goes less than the regulation 7 innings (darkness, or run rule, for example), he may only need 3, But if the starting pitcher can't be the winning pitcher, then once again it is the most effective relief pitcher.