Bad idea, in my opinion. This comes across as manipulative and underhanded. My personal policy is that if the companies I work for are not able to compensate me commensurate with my value then I 1) have a conversation with the appropriate people about my dissatisfaction with my pay and the value I provide, and 2) begin looking for another job.
If they value me, and respond to my forthrightness then we'll figure out something workable for us both. If not, I find another job and leave.
Alternatively, you can talk to your boss ahead of time (say 6-12 months) and specify what you want and ask what it would take to achieve the goal (promotion, raise, etc.). Then you execute your agreed upon plan. If, at the end of that period, they fail to uphold the agreement then look for another job and leave.
Your recommended approach is akin to being in an unsatisfying relationship, and, instead of talking to your spouse/partner/etc. you go find someone else then go back to your spouse/partner/etc. and say, well, I'm going to leave you unless you do X, Y, Z. Hah! For most of us that approach would not work out very well, and for good reason. It's not the way reasonable, mature, people of integrity behave.
Plus, I don't want to work for anyone who doesn't actively recognize and reward my value, and who requires (yes, there are places like this) you to go through the whole job hunting process and bring them an offer letter to give you a raise. F that. Ideally, the employer recognizes the value I provide and proactively rewards that value. Second best is employers who will give real raises (10%+) when an employee points out how much value they provide. Third best is real, 10%+, raises annually.
The current status quo of 2-5% increases amounts to little more than COL, and is utterly offensive. That's not a performance based increase, that's simply a retainer.
As an employee I'm acutely aware, as year #2 comes to a close, that if I don't get out there and find something better (better title, better pay, better benefits) then, in terms of opportunity cost, I'm losing money. Though my current position my prove to be the exception to that rule. We shall see.
And yes, I run all the numbers on the total value of my compensation package and any improvements/increases which have transpired over the previous years.
But getting other offers and then using them to force your employers hand is just childish, in my opinion.