Your reasoning is incorrect. When assigning priority, you look at atomic numbers and find the first point of difference. Since a carbon has 3 bonds excluding the main-chain bond, you compare the three bonds in order of decreasing substituent priority.
In the case of a terminal alcohol vs an aldehyde, vs carboxyl groups,
an alcohol carbon has one O bond, 2 H bonds.
an aldehyde carbon has two O bonds, 2 H bonds.
One O on the alcohol and aldehyde are the same. However, the next bond comparison is another O on the aldehyde vs an H on the alcohol. The aldehyde group has higher priority.
The same goes for an aldehyde vs carboxyl (three O bonds). The aldehyde and carboxyl both have two O bonds, but the third is an O on the carboxyl vs H on the aldehyde. The carboxyl has higher priority.
In the case above, the difference is a carboxyl vs a chloromethyl group. The first point of difference is a Cl on the chloromethyl vs a O on the carboxyl. Cl > O, the chloromethyl group has higher priority. It is inconsequential that the chloromethyl has hydrogens remaining, or that there are two more effective O bonds on the carboxyl carbon. The first point of difference determines priority.