I would add: Either you are an engineer that management trusts and whose judgement they value, or you aren’t. If you aren’t, you’re in a bad position anyway.
There's a good article about it. Saying no is a budget. In other words you don't have enough veto power to stop all bad projects so you need to be strategic about spending this budget.
https://lalitm.com/post/why-senior-engineers-let-bad-project...