Hi OP
Comming off ESA does not affect your PIP claim, what some menbers have reported when closing down their ESA claim, they have been sent a PIP review form.
Before closing down your ESA claim check your pension forecast
www.gov.uk/check-state-pension. I would advise you to have a discussion with your local welfare rights organisation: You can find your local Welfare Rights Organisation to help you with advice by clicking on the link below and putting in your post code, it will then come up with a MAP with a list of agencies.
advicelocal.uk Gary