Consider the following sets:
$A$ be all triples $(x,y,z)$ where $x,y,z\neq 0$.
$B_z$ be all triples that $x,y\neq 0$ and $z=0$.
$B_x$ be all triples that $y,z\neq 0$ and $x=0$.
$B_y$ be all triples that $x,z\neq 0$ and $y=0$.
$C_z$ be all triples that $x,y = 0$ and $z\neq 0$.
$C_x$ be all triples that $y,z = 0$ and $x\neq0$.
$C_y$ be all triples that $x,z = 0$ and $y\neq0$.
It is obvious that $A\cup (\cup B) \cup (\cup C)$ are all possible triples of $(x,y,z)$
Let $f(x,y,z)=2(x+y+z)-3(xy+yz+zx)+4xyz$
We can show that for all triples $x, y, z>0$
$f(x+z,y,0)-f(x,y,z)=2(x+y+z)-3(xy+zy)-2(x+y+z)+3(xy+yz+zx)-4xyz$
$=3zx-4xyz=zx(3-4y)>0$
Hence for any $x,y,z\neq 0$ we can find a triple namely $x+z,y,0$ that will result in a larger $S$.
Hence the triple that maximize $S$ cannot be in set $A$.
Now let $g(x,y)=2(x+y)-3xy$.
We can show that for all tuples $x,y>0$
$g(x+y,0)-g(x,y)=2(x+y)-2(x+y)+3xy>0$
Hence any tuple $x,y\neq0$ has a corresponding $x+y,0$ that will result in a larger $S$.
Hence the triple that maximizes $S$ cannot be in set $B_z$. Similarly we can show it cannot be in set $B_x,B_y$ as well.
So it must be in set $C_x$ or $C_y$ or $C_z$.
WLOG assume it is in $C_z$ then $x=y=0$ and $S=2z\leq 1$.
To show this is indeed the maximum, assume there exist another triple $(x,y,z)$ that result in a larger $S>1$. By applying our process, we can find an even larger triple $(0,0,x+y+z)$ in set $C_z$ and this would mean $2(x+y+z)>1$ contradiction.