Not TSA. But CBP/ICE, yes.
When entering the country, your due-process rights are limited. How limited? Depends on your immigration status/citizenship.
You're a non-citizen? You have few (if any) rights to due process, at least until they decide to release you. Until then, it's pretty much anything goes. This applies to Green Card holders, foreign nationals with valid visas to enter/return to the US, basically anyone except a US citizen.
You're a US citizen? Then legally, you do not have to make the contents of your devices available to ICE agents. But they can detain you indefinitely if they decide to. If you do not comply with their request to allow them access to your device, it's anybody's guess how they may react.
Even the due-process rights that you technically have (or should have) may not be in force if they decide to take action against you, and you are either held or immediately deported. In that case, your only recourse may be legal actions after-the-fact - which can mean very little (as we have seen in some high profile cases).
The most egregious cases that have received widespread press tend to involve foreign nationals (returning from short trips overseas). There are plenty of those in the news. There is often some "gotcha" or "hook" that appears to be what triggered the deportation action - the individual spoke out publicly against the current administration (expecting 1st amendment protections...the 1st amendment does apply to all people here, legally or otherwise - but if the administration decides to grab you and quickly put you on a deportation flight, there's little you can do once you land in El Salvador or wherever they send you). Something was found on their phones (photos from someone's funeral, who knows what else). Or they were just looking for trouble for you and found something that made them say, you're next.
There now are countless cases every day that fall below the media attention threshold; these are typically just people being grilled for hours at an airport but no cold showers, no shaved heads, no instant deportation to a private prison in El Salvador. I have family members who got a dose of this about a week ago. Not fun and to some extent traumatic but not life-threatening.
So your risk profile is probably fairly easy to gauge. A US citizen with some online rants about he who shall not be named? Probably not highly risky if you look like Rick Steves (or me). If you're more swarthy and/or are not a US citizen (even if you have broken no laws)? Time to be more circumspect.
Here's a new one from yesterday: The Guardian - Australian with working visa detained and deported on returning to US from sister’s memorial
I'm going overseas this coming week. I am taking no extra steps to hide my views from anyone upon my return - though I'm probably not going to look for an extended discussion with the ICE agents (because others in my traveling party want to minimize their risk). If ICE wants to search my phone I'm not going to give them access (note to self: turn off face ID recognition before we land...). They can hold me as long as they want. What's on my phone is none of their damn business, they can search the internet all day for dirt on me and my log-ins for Rick Steves dot com and elsewhere. Maybe I'll be posting a Trip Report from El Salvador one of these days (maybe I'll see Rick there...). If they want to make an example of me, they can do that. I'm not going to let them bully me.
Good luck.