Sculpting and custom axis?
I'm new to this board so I don't know why my previous attempt to answer was deleted. Maybe it was just to short last time so I'm trying to be wordier. Its a perfect solution to your issue because I use this same technique. Its a very simple but it works. and I'm being as clear as possible.
Instead of rotating the view to your object, rotate your object to the view, so that the plane you want to sculpt is aligned with the correct axis. That way you can still lock the x and y, and just sculpt along Z axis.
With the axes locked, you can see that the sculpted verts only move in Z axis.

You can rotate the object instead of rotating the view to keep sculpting only locked to Z axis. Rotated 90 degrees

Even if you dont rotate 90 degrees, you can rotate the object however you want and the sculpting is locked to one axis. The vertices are only moving up. Rotated 45 degrees.