That is one of the pieces of advice which it is only safe to take at an R1 and which I wish R1 faculty would stop dispensing at people who will lose their jobs for taking it.
Real advice: Learn never to say no. You were once an adult, you were once allowed to say yes or no, but you are a child now and you must remember this, for the sake of your own health and safety. Say yes to whatever they want, no matter how destructive, because the results of saying no will be still worse. You can say no to a peer or to someone you have enough experience at your place to know has no real power or credibility. But never say no to anyone with any power because it will cause you permanent and serious trouble.
Learn to be passive agressive. Say yes to everything but once on the project, do not volunteer to do any actual work. Nod and smile. If asked to do some actual work, say yes and then do not do it. Or, do a small piece of work so you can appear to have obeyed while not doing so really, and while actually blocking serious completion of the project, because this is your unnamed but very important role.
If passive agression is not your style and you do not wish to acquire it, leave academia while you are young enough to make a strong career shift. From my perspective nothing you could write, no matter how important; nothing you could “contribute” to “thank” “the Profession” for “having allowed” you to earn the Ph.D is worth having to deform yourself in this way.