I agree with the analysis above, with one addition: a big reason to pay yourself more at any owners only profitable small business is to max out a contribution to a 'individual 401k', sep-ira, or similar. The rules vary, but if your 'salary' is in the $250k ballpark, you can contribute up to $51k in additional money to a tax deferred retirement plan. Just like a 401k, it grows tax free.
Most SS taxes are capped just above $100k, and if you own a tech company it's pretty hard to argue you salary should be below that, so the SS angle is limited. But tax free compounding on $51k/yr is a significant benefit.