You could try using Previcox/Equioxx instead. They’re the same compound as each other and less inclined to give horses stomach ulcers compared with bute. Previcox is the dog version and much cheaper than equinox for the same amount of active compound but some horse vets won’t prescribe you the dog version
Short term, targeted use of bute/banamine is perfectly fine unless the horse is extremely sensitive to it for some reason. Equioxx is a lot more expensive and is easily overdosed, unless you use the paste. It also doesn't clear the bloodstream for over 24 hours.
If the bute works to help her thru the trim session, there is no reason not to use it.
My opinion is that your horse should not be sore after trimming. Either too much growth between trims and/or the trimmer is taking too much off. If you could provide before & after pics of hooves we can better give you answers.
In any event, My Best Horse has a product called Mov-Ease which is advertised for improving stiffness. I give mov-ease to my 23 & 25 yr olds.
In this particular case, I believe that this isn't about being sore after trimming but that the horse needs help to be comfortable while the trimming is being done.