You have the ability to esim so you're good there. I would recommend the Europe unlimited plan for $35 on airalo, 5GB is $20 and 10GB is $37 so might as well go unlimited. iPhone 12 is unique in that you can only have 1 physical SIM active and 1 esim active. But in your scenario I don't forsee an issue.
Texting is a little tricky with iPhones in particular. Are you actually texting people or are you using imessage? Easy way to check is do the people you wanna text have green bubbles when you chat with them or blue? If they're blue, you just need data. If they're green you're gonna need to keep your US sim active (or use an app to message to folks) to be able to text.
Now you mentioned TMobile which has most plans that include international texting (IE you can text US numbers without fees but texting to international numbers cost money) so I would verify your plan to make sure.
Then you can dual sim and have the esim for your data and still be able to text from your US phone number no problem. You'll need to select your primary phone number as the voice line and your esim as the data line.