Phrase for a kind, but unnecessary gesture

I wouldn’t overthink this; you’ve already hit upon a perfectly good word:

gesture, n.
4. b. transferred and figurative; spec. [after French geste; compare BEAU GESTE n.] a move or course of action undertaken as an expression of feeling or as a formality; esp. a demonstration of friendly feeling, usually with the purpose of eliciting a favourable response from another.
Source: Oxford English Dictionary (login required)

They both knew she was more than capable of getting up by herself, but the gesture was appreciated.

Applying for the job was only a gesture, as Alex knew they were underqualified and had no chance of receiving an offer.

It was a gesture, but still meant a lot to the barista.

Rather than being offended by zir, the obvious gesture made her smile.


You could try token.

Cambridge

token: noun

something that you do, or a thing that you give someone, that expresses your feelings or intentions, although it might have little practical effect

The word may also be used adjectivally in token gesture. For example,

Cambridge

token: adjective

"The wording of the advertisement was merely a token gesture towards equal opportunities"


Go through the motions (Phrase)

If you say that someone is going through the motions, you think they are only saying or doing something because it is expected of them without being interested, enthusiastic, or sympathetic.

'You really don't care, do you?' she said quietly. 'You're just going through the motions.'

[Collins]

to do something without making much effort to do it well

He claimed that he was looking for a job, but he was really just going through the motions.

[Merriam-Webster]


Applying for the job was only a small kindness, as Alex knew they were underqualified and had no intention of accepting an offer, but they also knew it would reassure their friend to know they hadn't applied alone.

Perhaps your situations are examples of a small kindness, i.e., using your word, kindness, as a count noun, an instance of it.

kindness (n.)

[count noun] A kind act.

It would be a kindness on your part to invite her. Lexico


He used to sit with Josh on the couch until his parents got home from the movies, a small kindness but still a kindness. Lucas Mann; Lord Fear: A Memoir (2016)

I marched in that Macy's Thanksgiving Day Parade with holes in my shoes and a trombone that wouldn't play. I faked every song, extending my arms dramatically to look like I was playing in sync with the others, but there was no sound at all coming out of my instrument. Everyone else was playing their hearts out with great gusto while I could only pretend to play. The band leader knew it, too, but he never said a word. He let me fake my performance so I wouldn't miss the trip. It was such a small kindness, but it's one I will always remember. T. March and M. Karlins; Paying it Backward (2020)


"Thoughtful Consideration"?

Perhaps it is not as eloquent as you might be seeking, but personally I would have used "thoughtful consideration" in place of all the blanks in the provided examples (except in cases where it may have appeared twice and could be considered somewhat repetitive).

~However, it's worth noting that I do recognize the circumstances and purpose behind their dual inclusion and sincerely appreciate the thoughtful consideration that went into articulating your intentions.*

*(Said both as a true statement and as an example to confirm whether or not the understanding is congruent with the request)

Supplemental Notes

Please excuse me if I'm being too literal here, but to show support and kindness and to be sincere about it is a bit different than wanting to appear or seem to be sincere about showing that support or kindness. That is to say that if one's intention is to convey a sense of sincerity in their gesture of support (and is genuinely being sincere), then it should be irrespective of whether or not the one making the gesture thinks it's not going to work or is not needed as the action would be coming from a place of consideration which allows any perceived notion of it being needed/not needed, significant/insignificant, or helpful/unhelpful be determined by the receiver, as it should be. How the receiver might infer the intentions of the gesture should not be influenced by the one offering or making the action if showing support and kindness is the true motive, at least, in my opinion anyway.

In contrast, if the motive was (and I don't believe this applies in this case but only offer it as a means of clarification) just to appear like a kind and supportive person or to appear as a sincere person, whereas perhaps there is no genuine desire to be supportive but is an action being performed simply out of habit or because it's what is expected and as a result of pressures imposed by societal norms, then in that case and for the purpose of display, a phrase to express that failure/lack of outcome wasn't a foregone conclusion might seem more like an oxymoron. At least, and please don't confuse my explanation as an accusation by any means, the impression I might be under if Nugatory and Performative are considered too negative for the intended purposes and seems to infer a desire to express some lesser level of negativity rather than none at all.

It might all just be conceptual semantics but, if there is greater difficulty conveying the meaning accurately, it may be helpful to ensure that the desired meaning is accurate of the intention.