This sounds a bit harsh but from the Gardening Know How website:
With yucca plants, care and pruning are easy. When your yucca plant becomes too tall for the space it is in, gently remove it from the pot. Determine where the halfway mark is on the trunk or a point where you wish to be pruning a yucca that is above the halfway point. Using a saw or a sharp pair of loppers, cut the trunk in half.
Repot the bottom, rooted end of the trunk. Water well and then you are done with your pruning. While the plants are recovering, continue caring for the yucca plants as you normally would. In a short time, the plant will produce new leaves. It will recover to look as good as it did before, except that it will be much shorter and more appropriately sized.
Reading that, I wouldn't think trimming a few leaves would harm it all.