There is a lot of talk about border security here, but it's important to note that juxtaposed controls are not obligatory for the Channel Tunnel.
This sort of was done in the pre-EEC days with the Night Ferry, via the use of mobile barriers at Victoria.
Yes, it's very easily done if the train can physically fit within the station. The only issue is that the UK fines companies rather heavily for every person who arrives without the correct documentation. Once the UK ETA is in place, it should be perfectly possible for operators to simply check travel documents and the authorisation before allowing travellers to board. The previous issue with the non-juxtaposed controls will cease to exist, because travellers will already be pre-cleared to travel to the UK.
The issue is that no operator is willing to take the financial risk right now, hence the juxtaposed controls solve the problem by passing it onto UK Border Force. But should an operator be willing to take on the risk (perhaps after the ETA begins), then it's perfectly possible to have entry controls anywhere in the country as long as the security of the train can be ensured.
Interestingly, the amount of travellers who warrant further inspection at immigration is really quite low. Among all the juxtaposed controls, there were only 1363 cases in the entirety of March 2022. 23% of those were then subsequently allowed to enter, so by my count, less than 1000 travellers didn't get to the UK.
The real problem is the simple lack of capacity. St Pancras was never designed to have such intensive controls, although a simple fix in the short term would be to relocate the French controls to the current entrance to the Eurostar ticket office/travel centre. You could then have people beyond the Schengen entry controls dealing with the UK exit controls (yes, back to front, but it shouldn't be a problem), and the ticket office/travel centre could be relocated over to the west side of The Arcade, in current retail space.
The current entrance is more than big enough to accommodate a large row of Schengen e-gates and manual controls.
Eurostar really doesn't need this huge space, and you could easily fit security controls within this area too. Arrivals should be able to go around the outside of this space in a separated corridor too.