(Still half jokingly)
Does this violate the 1st Amendment? As far as I'm aware, that provision of the Texas Penal Code has never been struck down on First Amendment grounds.
Probably not if applied extremely narrowly. (If you tried to prosecute someone for saying that they had earned the degree but has it revoked for non-payment of debt, it probably would violate the 1A.)
But, more to the point, that would only matter for most practical purposes for bachelor's degrees (and sometimes for more advanced degrees) if the degree was revoked before one had any substantial record of experienced based on it, since beyond entry level positions most positions rely on a pattern of experience to which a bachelor's degree is a typical (though often not exclusive) entryway, not the degree itself.
I suspect most companies wouldn't really care if your degree was revoked or not (unless it was revoked for cheating or other non financial reasons)
It's also possible that an explicit restriction on telling employers that you once had a degree would work, since we do have other cases where we restrict what people are allowed to ask and tell in job interview situations.
Another possibility is that the court could ask you to promise not to disclose your degree in exchange for granting you bankruptcy relief. Nondisclosure agreements are a thing, so this seems like it's probably legal?