Agree, but some things start to teeter on the line, especially for commissioned officers.
Any commissioned officer who uses contemptuous words against the President, the Vice President, Congress, the Secretary of Defense, the Secretary of a military department, the Secretary of Homeland Security, or the Governor or legislature of any State, Commonwealth, or possession in which he is on duty or present shall be punished as a court-martial may direct.
https://www.law.cornell.edu/uscode/text/10/888
Also DODI 1344.10:
http://www.dtic.mil/whs/directives/corres/pdf/134410p.pdf
A member of the Armed Forces on active duty shall not:
...
Participate in any . . . group discussion as an advocate for or against a partisan political party, candidate, or cause.