Hello and thanks for your question.
To get ESA you have to convince the DWP either that you are available for work, or that you are medically unfit to work.
When you foster children, the children will have come through a difficult time, so are likely to need a lot of time and attention from you, so it is unlikely that you will be free to take up employment. You will also need to be fit, as looking after foster kids is hard work and you will need lots of energy.
So - unless the local authority where you plan to foster tells you differently, I think it's very unlikely that you will be abel to claim ESA at the same time as beign a foster parent.
HOWEVER, you will receive a weekly allowance for each child that you foster, plus tax exemptions. You can find out more here:
I hope this helps and I wish you the best of luck.
Thanks and best wishes...