It's a bad idea if you are assuming without any basis that your current employer will bring you back as a contractor. That may or may not happen, no matter how "nicely" you resign. Your company may be just as likely to simply replace you with another employee, at the same or lower cost.
People who return to their former employers as contractors have typically made those arrangements in advance of a scheduled retirement.
Don't forget to plan financially for the impact of self-employment taxes; you're not going to net your hourly rate even without the deductions you are used to for various kinds of insurance. You'll also lose any employer match to a 401(k) or other self-funded retirement plan.