In Vajrayana school as presented by Chogyam Trungpa Rinpoche there's a prominent line of teaching about so called "spiritual materialism".
SM is when we use spirituality as a way to accumulate the imaginary dharmic wealth and use it to pump up one's ego. SM is not as much about what you do on the outside as it is about your hidden attitude and motives.
The thing with ego, its attitudes and motives are always well masqueraded. Ego is a master of disguise, it has endless capacity for self-rationalization. Even though its real motives are always selfish, it will infinitely pretend to everyone and to itself that it acts entirely in the interests of the common good and other highest ideals.
Naturally, stalking the ego's, exposing its tricks, leaving it without nutrition, and ultimately making it starve to death is a most important practice in Vajrayana. The student and teacher employ a wide variety of techniques to accomplish this extremely difficult but important aspect of Buddhist training.
On the student's end, one technique used to knock the ground from under the ego's feet (🤔 does ego have feet?) - is to deliberately perform whatever acts the ego finds shameful -- the opposite of its normal food. This includes performing what may look like the sinful acts. The difference between these balancing actions and the regular unskillful acts is huge, while the regular misdeeds are done under the influence of passion, aggression, or confusion - these special skillful downfalls are done with the cool head and clear mind, aiming at breaking the ego's pretense of decency and consistency.
How is this done in practice? Specific acts are entirely up to the student to improvise. They range from something as mild as quietly swearing(cursing) about someone or something in the privacy of one's room, to breaking one or more of the five precepts in a highly public and visible way. I heard stories of lineage teachers going as far as to order the student to go steal something from a shop or even to (!) shoot a deer. Needless to say, picking an appropriate ego-cidal act requires great sensitivity and a mature sense of judgment on the teacher's and student's part. This is one of the reasons that the real Vajrayana is almost always a secret teaching presented only to the most advanced and capable of the students.
In the long term the practice gets more and more refined, until even an overly strong balancing act may be seen as ego's attempt to pass e.g. for an advanced Vajrayana practitioner, something that now has to be balanced out by its opposite and so on until the entire structure of balancing and counterbalancing acts collapses along with the ego itself.
This death of ego is the greatest disappointment a human can encounter in their life. The rock bottom thus hit serves as an unshakable foundation for the ultimate kindness, sincerity, courage, sanity, sobriety, and authenticity known as the Buddhist Enlightenment.