Cryptographically, this would not be a good choice. Firstly note that there are $2^{256}$ pre-images of zero which consist of any 256-bit value followed by 256 zeros. This makes collision finding trivial.
Next, there's a large class of outputs for which computing a pre-image is trivial, and there may be further weaknesses.
Let $y$ be a 256-bit number with the 2nd, 1st and 0th bits (the three least significant bits) set to 010 and with bits 3-255 such that there are no adjacent 1s in $y\oplus 2^{255}$. There are $F_{253}$ such numbers where $F_i$ is the $i$th Fibonacci number. I claim that it is trivial to find a pre-image for any $y$ of this form.
Specifically, let $z$ be the number created by masking off bits $2-255$ of $y$ and shifting down by 1 position (so that the 0th and 1st bits are 0). In other words $z=(y\oplus 2)/2$. Now let $x=2^{256}z+2^{255}$.
The first 255 applications of $f$ shift this number down by a bit each. The 256th application is the Collatz function applied to a 256-bit input $t=2z\oplus 1$ which is a number with no consecutive 1s in its binary representation. For such a number multiplication by 3 has no binary carriers and so $3t=2t\oplus t$. By our structure the last three bits of $3t$ are 011 and so $3t+1=4z\oplus 2z\oplus 4$ and $(3t+1)/2=2z\oplus z\oplus 2$.
Now note that the 4 256-bit numbers that we must XOR are 0, $2^{255}$, $z$ and $2z\oplus z\oplus 2$, which gives the answer $2z\oplus 2^{255}\oplus 2$. We then XOR on $p$ the path value, which is 1 followed by 255 zeroes (I'm assuming that the path is recorded with the initial step recorded in the least significant bit, but the generalisation is obvious) and obtain output $2z\oplus 2=y$.