You may be able to keep a heads-down position with limited political exposure, but you'll cap out relatively quickly, and easily be beaten by colleagues with better instincts. Your mobility across employers will be limited. Developers, like all groups of people, are subject to psychological forces too.
"Politics" are what happens anytime a group of 5+ people get together and engage. Throw in things like a paycheck and the stakes shoot way up very quickly, and that's never going to change. It is better to accept this perspective and learn to prosper within it than to live in denial and try to cling to a white-collar career maintained by sheer force of intellect (e.g., the inept developer).