As a senior engineer, I'd recommend not thinking about a "political game" most of the time.
Focus on demonstrable, measurable impact for your company's customers in the area that your team focuses on. If you do that, then you'll find that you're aligned with your boss and your boss's boss pretty much all the time.
You can argue for what you believe when you have data to back you up. If not, respect the judgment of your superiors. Figure out what your management chain wants to accomplish and then find the best measurable way to accomplish it. If you don't know. Ask.
Remember that the game is a long game. Software Development is unusual because many people expect to be "senior" 3-5 years out of college. In other fields, that will barely get you out of an apprenticeship.
I think about it this way:
1. Not all effort is equally valuable.
2. Not all value is equally visible/measureable
3. Not all value is equally aligned with your team/company's priorities
Find what efforts produce the most value that can be measured, in alignment with your company's priorities.
Usually when engineers feel like they have to "play the political game", they fall into one of these traps:
1. They are doing work that isn't actually valuable (e.g. an unprompted huge refactoring)
2. They are doing valuable work that is hard to measure (e.g. adding tests to a codebase without a plan to demonstrate improved developer velocity and/or product quality)
3. They are doing valuable, measurable work towards the wrong goals (e.g. building product-wide localization support without the company intending to localize their content)
Focus on demonstrable, measurable impact for your company's customers in the area that your team focuses on. If you do that, then you'll find that you're aligned with your boss and your boss's boss pretty much all the time.
You can argue for what you believe when you have data to back you up. If not, respect the judgment of your superiors. Figure out what your management chain wants to accomplish and then find the best measurable way to accomplish it. If you don't know. Ask.
Remember that the game is a long game. Software Development is unusual because many people expect to be "senior" 3-5 years out of college. In other fields, that will barely get you out of an apprenticeship.
I think about it this way:
1. Not all effort is equally valuable.
2. Not all value is equally visible/measureable
3. Not all value is equally aligned with your team/company's priorities
Find what efforts produce the most value that can be measured, in alignment with your company's priorities.
Usually when engineers feel like they have to "play the political game", they fall into one of these traps:
1. They are doing work that isn't actually valuable (e.g. an unprompted huge refactoring)
2. They are doing valuable work that is hard to measure (e.g. adding tests to a codebase without a plan to demonstrate improved developer velocity and/or product quality)
3. They are doing valuable, measurable work towards the wrong goals (e.g. building product-wide localization support without the company intending to localize their content)