I will say yes, that will be the way to do it.
One time, in my travels on biz (on the company dime) I was staying at a posh hotel in BKK . I had my room key with me (yes back in the dinosaur times, one actually had these big keys to ones room) while eating dinner. Set it on the table.
Waitress was thinking (I guess) dudes staying here, that means he’s signing for the bill and there goes the tip.
I got surly service. For no reason. I was nice and in no way unfriendly to her.
I thought about complaining. Then I thought. No. I left a substantial tip in cash on the table after I got my bill.
When the waitress came over to get the bill she saw i signed the meal to my room and left a substantial tip ! Tip was more then the meal cost.
It was obvious to her that i knew that she knew that I had gotten very bad service. And yet instead of giving her a hard time I gave her a very undeserved big tip.
The huge embarrashment on her face was plain to me. And I felt it was a way to "teach her a lesson " that she won’t forget soon.