If you're the DM, you can give inspiration for anything you want. But dice roll results are probably not what you want to encourage here.
Obviously the DM is in charge of everything at the table, up to and including overruling any published rule or detail from any official or unofficial source. But inspiration is even more explicitly under your control.
Ultimately, inspiration is a reward for playing in a way that the DM likes. If one of your players comes up with an idea that is creative and true to their character, as described in your question, I would award inspiration on the spot. For me, what earns the inspiration is the player thinking like their character and engaging with the game enough to come up with a clever idea.
Execution of the idea is irrelevant to the gameplay features I care about, and dependent on dice. Inspiration is not meant to be a randomly awarded prize. I would want to reward the player's approach to the game and creativity, and not the outcome of an arbitrary roll.
In response to Chronocidal's excellent point:
Possibly give them the inspiration when they start to enact the idea (but before they roll any dice!), or when the party agree to enact it? You don't want everyone to just sit in the pub trying to "come up with ideas" all night without actually doing anything...
It's not good to let players game an approach like this. My ideal situation would be players coming up with a clever idea, taking concrete steps towards it, and then having an inspiration die to help actually pull it off.
As novel example, I play tabletop games with a lot of people that like to min-max stats and experiment with optimized builds. But that's at the metagame level, and has nothing to do with the in-game behaviors that I particularly appreciate.
So my players won't get inspiration for taking an off-the-shelf build and playing it with a mathematical eye. However, if one of these players makes a suboptimal decision in-game (or even an outright error, given meta-knowledge) because it is true to their character or deepens the game in some way, I very well might award inspiration even though that choice makes "success" less likely.