he's never done it at any other time, before or after; he's only a Maiar, not
Eru or a Valar; and Powers of Good are pretty much forbidden from messing with
people's minds.
Someone may have sent the vision, although I have plenty of images leap
unbidden to my mind (such as orc baggage handlers and Aragorn with luggage
tickets) that I'm sure are not from a divine source. It's deliberately
ambiguous.
The incident on Amon Hen is quite different. Gandalf himself says that he was
striving with Sauron there, not with Frodo. Remember that Frodo acts only when
he becomes aware of himself, separate from the two powers.
A supernatural power has attempted to take control, so another supernatural
power steps in and prevents it, in order to allow the individual to make the
choice. If Frodo had not removed the Ring, however, Gandalf would not have
forced him. He shouts at him, but he does not take control of his body.
And the fate of Middle Earth hangs in the balance. There's really no desperate
need for Pippin to leave his footprints or drop his brooch. It makes no
difference to their immediate fate, or to The Three Hunters.
It does make a difference to Pippin in the long term, in that he has begun to
mature and develop self-confidence, but that actually argues for no divine
interference.