geometric head is 143.5 minus 140.5 if the pipe ends in an open manhole. What happens after that is irrelevant to the pump.
See attached graph.
Your problem is that because you have an open end, there isn't sufficient back pressure in your pipe to keep the pipe full of liquid past the 149m high point at kp 723m. This point now effectively become the end of your pipe for hydraulic purposes as the flow will be gravity from that point onwards and try anf low faster than the incoming flow (called slack flow). Thus moving back from that high point with your calcualted losses, your pump discharge head to do your flow is 168m-144.4m = 24m assuming that your pump is at the 144.4 m level - the yellow line.
Forget all about the other head losses and concentrate on friction only, plus the high point at the end of the pipeline which actually defines your hydraulic end point, hence static head is actually 149 - 144.4 plus friction of say 18 allowing for the reduced length = 23m - essentially the same as the graphical solution ( I added 1m for graphical purposes).
What you seem to neglect is that for a pipe which is filled with liquid and kept above 0 barg at all times, whilst there is effort to move the liquid up the hill, this is balanced by gravity helping it down the hill on the far side. Think of this as continuous train of trucks for the entire length all joined together. Once you've got trucks from one end to the other then the ones going down the hill will help to pull those going up the hill. The problem you have is that at the 149m mark, the trucks become detached and run down the hill under their own volition, faster than the trucks being pushed along. Thus gaps start to appear between the trucks.
My motto: Learn something new every day
Also: There's usually a good reason why everyone does it that way