The Jesus that I grew up learning about by the Jesuits would never want us to pour that oil on his feet rather than to sell it and give it to the poor. Jesus never wanted glory, he wanted us to help and love each other in His name.
Correction, it was Judas who railed that the oil should be sold and the money given to the poor. Judas, being a thief as well as a traitor, had his own reasons for saying this, and concern for the poor was not one of them. Jesus did not object whatsoever to being anointed with the expensive oil. It had nothing to do with His earthly glory. Were you really taught the deeply flawed interpretation you have related?
“Mary took a pound of costly ointment of pure nard and anointed the feet of Jesus and wiped his feet with her hair; and the house was filled with the fragrance of the ointment. But Judas Iscariot, one of his disciples (he who was to betray him), said, “Why was this ointment not sold for three hundred denariib and given to the poor?” This he said, not that he cared for the poor but because he was a thief, and as he had the money box he used to take what was put into it. Jesus said,‘Let her alone, let her keep it for the day of my burial. The poor you always have with you, but you do not always have me.’” (John 12: 1-8)
Hahn, Scott; Mitch, Curtis; Scott Hahn; Curtis Mitch (2010-06-14). The Ignatius Catholic Study Bible New Testament (Kindle Locations 10412-10413). Ignatius Press. Kindle Edition.
From the Ignatius Catholic Study Bible commentary by Hahn and Mitch:
"12:3 pure nard: An imported spice from India. anointed the feet: Matthew and Mark have her also anoint the “head” of Jesus (Mt 26:7; Mk 14:3). the house was filled: The detail suggests John is testifying to what he himself smelled on the occasion. It may be symbolic of what Jesus says explicitly in the Synoptic tradition: the spread of the fragrance throughout the house anticipates the (Mt 26:13; Mk 14:9). Back to text.
12:5 three hundred denarii: Nearly an entire year’s income for a laborer, since a single denarius was equivalent to a single day’s wage (Mt 20:2). It is tragic that Judas complained about Mary’s extravagance when he himself betrayed Jesus for much less—a mere “thirty pieces of silver” (Mt 26:15). Back to text.
12:6 not that he cared: Judas wants to pocket the proceeds of the sale for himself, not to give it away as alms for the needy. the money box: Suggests that Judas was the treasurer in charge of the disciples’ funds (13:29; Lk 8:3). Back to text.
12:8 The poor: Jesus is not indifferent toward the poor. Elsewhere he promotes almsgiving in no uncertain terms (Mt 6:2-4; Lk 6:30; 12:33). • The words of Jesus echo the words of Deut 15:11, which states that the unceasing presence of the poor offers countless opportunities to give generously to less fortunate neighbors. The disciples, too, will have plenty of chances to give alms, but only a brief time remains to be generous toward Jesus while he remains among them (CCC 2449). Back to text."
Hahn, Scott; Mitch, Curtis; Scott Hahn; Curtis Mitch (2010-06-14). The Ignatius Catholic Study Bible New Testament (Kindle Locations 11718-11727). Ignatius Press. Kindle Edition.