No, upper hand only works if the opponent selects a physical or special move that has a priority of +1 to +3 including upper hand thus then attacking first and flinching the target. Status moves do not make Upper Hand go first so Whimsicott is able to taunt and encore as many Pokemon as it pleads.
Source: https://bulbapedia.bulbagarden.net/wiki/Upper_Hand_(move)