Try not to worry too much about deciles and points etc.
During my time at medical school the application for jobs changed beyond all recognition a couple of times and it has done again since - and if you're only second year now, there is nothing to say that it might have changed yet again before you get there. So there is nothing to say that stressing about deciles now will do you any good in the future if and when things change.
Do the reasonable best you can but have a life too and look after yourself and make sure that these things don't take over your life.
At present, unless you are within the very top and get honours, then as far as I know there is no distinction made in ST applications between those who were 1st and 10th decile. The further beyond med school you get, the less relevant these things are and the more of a melting pot the applicants are in terms of background, year of graduation, career journey to date.
All foundation programmes are good. The aim of foundation is to get a good basic knowledge of being a doctor, doing the basics well and learning some decent general skills in some medicine and surgery jobs. You can do that pretty much anywhere. The biggest teaching hospital is not always the best place to be an FY1, and your average DGH can give you a perfectly good experience. Personally I think it can even be a better experience. You might not get your first pick of geography, depending on whatever the application hoop-jumping is when you graduate and how you manage to jump those hoops - but again a lot of people move round after med school, and most people nonetheless get reasonably close to where they wanted.
Often but not always, people find clinical years quite different to non-clinical - so progress in preclinical years cannot be directly extrapolated to predict how you'll do in clinical. it's not as clearcut as 'people who do struggle through preclinical will fly through clinical' and vice versa, but it's nonetheless not an uncommon experience for people to think that their clinical progress will mirror that of their preclinical years and then find the reality to be somewhat different.
Keep up the good work, remember to look after yourself, eat and sleep, keep up some hobbies and keep your friends and family close, this will stand you in good stead throughout the years ahead and help you to do as well as you can.