The rule is based on research mostly starting with something called the Trinity study. Basically they found that historically, starting with 4% of the initial portfolio value and increasing that initial amount by inflation, your money would last 30 years approximately 95% of the time. This is assuming a certain investment mixes which I don't recall exactly but were probably at least 50% stocks.
The Trinity study did not say anything about Social Security. Some people, as you suggest, treat it as a bonus to be used for a looser budget or to cover increased health care expenses. Others (like me), treat it as a future income stream which can be converted into a current asset value using a net present value (NPV) function; this current asset value can then be included in the "stash" from which a 4% calculation can be made.
Many people choose to only assume a percentage of their projected Social Security benefits based on concerns over the program's financial viability. It tends to be younger people who do this. I am 48 and assume I will only receive 40% of my benefits.
Since there are risks associated with all of these things, the important thing to do is understand what the research says about the 4% rule, look at your own situation and goals and risk tolerance, and make the best choice for you (which may very well differ from the best choice for others). If you're making highly unusual choices, you may also want to have a very solid justification in your own mind for those choices.
Good luck!