I saw the game already have implemented adjustable pillars for buildings when the terrain isn't perfectly flat. And the pillars could already be tall enough to let conveyers go under buildings. (I think it's 2m max or it says the floor is too steep).
At the moment, there's a problem with the Z axis. I'm not speaking of absolute Z coordinates but Z relative to the ground : height. We mostly face it with conveyer belt (and their pillars/stackable pillars) but not exclusivly. There is multiple solutions for this problem :
1°) A first one is what you've done. Placing in 2 steps (i.e. consecutive settings). 1 click for X and Y axis and 1 click for Z axis. The problem is that it slows the building process and it would be bothering to always double click every building when you simply just want to build on the ground most of the time. So you (a bit) logicly enabled Z axis exclusivly for conveyer pillars.
BUT! You could already improve this solution by enabling the double click/Z axis placing on everything related to belts (make a class of item : "belt-related"?) when it's not snapping to an input/ouput end. I'm thinking of stackable pillars and even belt themselves (when you place one end on the ground and it automaticly builds pillars).
Others improvements would be (for items with double click placing/Z axis enabled) to not cancel the whole placing when you right click but just go to the previous step (X and Y axis) while KEEPING!!! (T^T) what was set on the Z axis setting. This way you could actually SEE and not guessing where to place an item with variable height. The last Z axis setting (canceled or not) would be default for following Z-axis-enabled item.
And finaly, while in Z axis setting, possibility to hold CTRL to switch into a fine setting of Z axis (Let's say 1m steps). (Current Z axis setting is with steps of 2m) And maybe raise the max height setting for pillars to 8m or 2 fondations? (Currently 6m or 1 and 1/2 fondation).
2°) Have a dedicated key to lock (when hold) X and Y axis and unlock the Z axis. It would work exactly the same as previously except you hold (let's say ALT key) to go to setting "two" (Z axis) and release ALT to go back to setting "one" (X and Y axis). A single click validate the whole thing.
The big advantage is, since you can always place things in a single click, you can enable Z axis for all non belt-related items too. Maybe just with a smaller max Z axis to make sense... xD (let's say the current max building's pillar length : 2m).
All the previous suggestions for your current solution could be applied equaly to this solution.
Bonus : can use ALT key and the wheel-mouse to rotate the choices (2 at the moment) of what kind of pillar to place under conveyer belt when placing conveyer belt. This way, you don't lose the possibility to snap to grid (and maybe later to rotate position with fine setting?) with CTRL key.