Yes there is flexibility. I wasn’t heavily involved in the arrangements for the Channel Tunnel but I did manage other areas of the UK where airlines and ferry companies would apply to start new international routes. I managed the north of Scotland in the 1990s and one airline started a service from Amsterdam to Inverness. Another had weekly holiday flights from Paris to Stornoway and another from Bergen to Sumburgh (Shetland Islands). Borderforce didn't have any staff in any of those locations. We could theoretically have told the airlines they couldn’t operate (though under EU law there are restrictions on what can be restricted in that way) so instead we tended to work with the airlines to ensure that the flights arrived at times that we could provide staff for (who were sent in from elsewhere in Scotland) and we charged the companies for that service.
It would surely be the same with new international train services. It’s unlikely that they would simply be refused permission to operate. That’s not in the UK’s commercial interest. What you would be looking at would be ways of operating that ensured that border security was protected, and as you say ensuring segregation and international security checks. So they might get the green light to operate but under conditions restricting where they stopped on the way to the UK. (Journeys out of the UK are less sensitive. As far as the UK is concerned, they can stop where they like once they have gone through the tunnel).
Sleeper services to the UK will surely be a difficult area. The old days of leaving your passport with the steward for it to be stamped in the middle of the night are long gone. A face to face encounter for every passenger is now the minimum and many foreign nationals have to have their fingerprints checked, which can be done on a portable machine, but which can’t be done professionally if you are lying in your expensive sleeping compartment. Passengers don’t want to have to get out of their bunks at 2 in the morning. So in simple commercial terms they either need to be checked when they board the train or on arrival. Boarding is probably the UK’s preferred option but from my experience it also happens to be the rail companies too because then the passengers don’t have to queue on arrival, which is very popular. (Dublin & Shannon Airports have pre-clearance for passengers to the US. US immigration staff check passports in Ireland, so you avoid their controls on arrival. Very popular and people go out of the way to use those routes).
I recall considerable discussion in London in the 1990s when the rail companies were proposing international sleeper services. We weren’t sure how it could be done without causing massive delays, and having staff at half the rail stations in the UK, for 1 train a day. Not very efficient. I think the Home Office was quite relieved when the rail companies decided the services weren’t commercially viable. I think (but don’t know) that they concluded that actually not all that many people wanted to go from Glasgow to Paris or Berlin by overnight train. And I don’t think that has changed much today.
An issue that didn’t really exist in the 1970s was asylum seekers. There were a few but they were usually people fleeing from Iron Curtain countries and the numbers were very small. Today many people seeking to relocate for what many would say are simple economic reasons designate themselves as asylum seekers. Some are genuine and some are not. Under the UN conventions relating to asylum you are supposed to seek asylum in the first safe haven. You are not supposed to go “asylum shopping” choosing one country in Europe over another. So unless you consider France or Belgium to be unsafe countries, in most cases there is no reason why someone in Brussels, Paris or Calais, should not seek asylum there. And so if someone seeking asylum presents to the UK authorities at the Gare Du Nord, they are usually simply advised to apply in France, and referred to the PAF (the French Immigration authorities). Likewise in Brussels. So from a UK perspective it’s a very simple and effective system. If the person makes it to the UK, their application can still be rejected on 3rd country grounds (ie they should have applied in Belgium or France) and they can be sent back there but it all takes a lot longer and costs the UK taxpayer, especially when the lawyers get involved. So having controls in Europe makes the UK controls more effective and fortunately also apparently suits the rail companies commercial needs.
Regarding Schengen, the UK isn’t in that agreement, so as far as we are concerned it doesn’t count as an exit check. (Well not when I worked in that field anyway). I don’t know much about the arrangements at St Pancras and would be reluctant to comment on the detail there, but I am sure the general policy will be to ensure they meet the same standards that exist at airports and seaports with international services. So no mixing of inbound international and domestic passengers.