If built right 2x4 is more than enough. it depends on a lot of things like the type of wood/etc. I use 500psi for calculation which gives a huge safety margin for even the weakest wood. In reality the maximum psi load for most any wood sold as a 2x4 is going to be over 1000psi for No. 2 grade or better (which almost everything sold qualifies but check when you buy). A 2x4 is roughly 5 square inches so using a very low 500psi number gives you support of 2500 pounds per post. If your tank is 5000 pounds that is only like 1200 or something per post. That is all compression strengths of course you need to have enough posts to keep stable and to keep the weight off of the horizontal supports.
Main thing is to ensure everything is braced to prevent any movement side to side and that the stand is perfectly level. Whether you use 2x4 or 4x4 you are out of luck if the stand is not built right. Using a 4x4 wont give you any extra "insurance" for a poorly built stand because the problem would not be the post buckling or breaking as much as the risk of it falling over (ie if post not level the bottom will try to kick out). If it makes you feel better with 4x4 then maybe double up the 2x4 on the corner, but would not waste money on more expensive 4x4 for all your posts.
Main thing is to ensure everything is braced to prevent any movement side to side and that the stand is perfectly level. Whether you use 2x4 or 4x4 you are out of luck if the stand is not built right. Using a 4x4 wont give you any extra "insurance" for a poorly built stand because the problem would not be the post buckling or breaking as much as the risk of it falling over (ie if post not level the bottom will try to kick out). If it makes you feel better with 4x4 then maybe double up the 2x4 on the corner, but would not waste money on more expensive 4x4 for all your posts.