This is the Programmer equivalent of a "midlife crisis" :-)
The "Industry" is squarely to blame for this sorry state of affairs by trying to do everything cheaper, faster, fad dependent, management controlled, focused on short-term bottomline and in a word, trying to "factory style industrialize" Programming.
The "Art, Joy and Creativity of Programming" have all been banished and there is only "Drudgery" to suffer through in most companies. Countless "Bullshit Jobs" have been created (eg. Scrum Master) which add no value whatsoever and even worse, they are given power over the "Real Engineers". In order to justify their existence they invent unneeded processes and insert themselves into the management hierarchy. "Engineers/Engineering" are no longer considered central but merely "Resources" to be "Managed" and "output extracted from" in service of an imaginary "Market Value". You have been reduced to being a "Cog in the Wheel" with your Individuality/Identity/Confidence stripped away and told that is the "Normal Order" of things.
So how do you deal with it?
* Start by saying "No" to every useless/pointless request. Refuse to participate if it adds no value. Be blunt so the message gets across.
* Treat it as a standard 9-5 job and keep the quest for "Art, Joy and Creativity" separate.
* Team up with like-minded Programmers to Brainstorm/Discuss ideas to Motivate/Recharge the "little grey cells".
* Find something interesting (eg. Optimization, Formal Methods etc.) and start studying it for Intellectual Satisfaction i.e. "Knowledge for Knowledge's sake". Keep your Job's needs separate from your Self's needs.
Finally, always keep in mind the fine balance between Pragmatism and Idealism and when to give up one for the other i.e. the need for a paycheck vs. the need for intellectual satisfaction.