While I recognize that
@iserith has the right of how the 5e DMG does social interactions, and that it's a functional framework, I find it to be lacking in creating the kind of memorable social encounters that I want. The 5e framework, on it's own, feels like it's still functionally one dimensional -- you're moving towards your ask and you get it or you don't. I don't find that to be rewarding.
Instead, I expand almost all of my important social encounters to use a skill challenge framework (usually 4-5 successes before 3 failures). I borrow from the 5e in that taking an action to uncover a BIFT is useful, but the structure of the encounter isn't 'Improve Attitude, Make Ask' but a more incremental step through. Players declare actions to move towards their goals, with successes changing the situation in a positive way and failures altering the situation in a negative way. This combination means that a situation can resolve with the players getting what they want, but also having negative complications following them (success in the social challenge may not remove failure consequences, depending on what actions the PCs take).
This removes the 'one bad step into the GM's scripted NPCs reactions' problem, in that no single insult, even if the GM was inclined to rule it an autofailure, would derail the social encounter. Instead, I'd add a complication that would indicate a failure had occurred. In fullness, I'd ask the PC what they wanted to accomplish with their insult (the goal of the action declaration) and then probably ask for a check to see if they got what they wanted. A failure, in this case, might result in me narrating the Burgomaster taking a depth breath, ringing a small bell on his desk that causes the door to open and two guards to step in and stand beside the door, and then saying something like, "No man has dared insult me for half a decade. It is only with great effort I'm willing to afford you leniency, but once more and I shall not promise I will withhold my wrath." This doesn't end the scene, but it does raise the stakes and let's the PC's know that something involving guards is now on the table and that insults are not the way to influence the Burgomaster successfully. If the PCs try the insult route again, I might very likely rule that an autofailure, given the situation as it stands. However, if the PC decides to press their case that the Burgomaster is in the wrong, but refrains from outright insults, they'd get a chance, although a failure might then be taken as an insult and that PC would be taken away to serve a term in the stocks/jail for their belligerence, and the party would now be very close to failing to get anything positive from this scene (3 failures).
Regardless of how the scene ends up, the PC that insulted the Burgomaster would now have a very frosty relationship with the Burgomaster and anyone allied with him, which might lead to later interesting social encounters.
To wrap up, I find 5e's DMG version of social encounters to still be very one-dimensional, although I like it better than free-form GM sim social encounters (which always end up as 'guess what the GM's thinking'). I embellish it with some 4e tech, and that works for me. I also always look at failures in the social pillar (and, honestly, in the exploration pillar) as 'fail forward' opportunities where I can introduce a complication or consequence without closing off overall success outright. Repeated failure will result in overall failure, but, again, usually in a fail-forward way that means this approach is invalid (and has a steep cost), but other methods are still available. Failing to convince the Burgomaster, for instance, would have repercussions (which may include being run out of town), but you can still engage with the Lady or overthrow the Burgomaster outright or something entirely different -- all of which will have their own sets of outcomes.