I think one barrier to applying this advice is we tend to look down upon the idea of avoiding temptation, but we praise the idea of resisting it.
Resisting temptation requires strength. So it is viewed as a virtue in and of itself. There is a heroic struggle. Avoiding temptation is sometimes seen as a sign of weakness. The implication is you're only avoiding it because you can't resist it. Almost like running away from a fight instead of facing your enemy.
Ultimately, I think it's more constructive to employ both strategies. You need to develop the ability to resist temptation because there are times when you cannot avoid it. But there is no sense in sabotaging your success by dealing with temptation when you don't need to.