Any risk to changing WP table col CHARACTER_MAXIMUM_LENGTH?

The post_type field is an internal feld, you shouldn’t be giving it values that require longer column lengths, and there’s no need for it to be user facing.

WP allows you to override everything about it, from the query variable name, rewrite rules, to the wording displayed.

But more importantly, you shouldn’t modify WP core. That goes for the database table schema too. WP will overwrite your changes when it calls dbDelta and restores the canonical database schema as part of the update process. At which point your column will get truncated. You might be able to get away with adding indexes at best, adding custom tables is fine.

So:

Did WP reset the CHARACTER_MAXIMUM_LENGTH perhaps?

Yes

Is what I’m doing an unstable way of solving this problem?

Yes

(as opposed to, say, clipping or hashing post_type values to preserve arbitrary length)

You shouldn’t need more than 20 characters for a post_type, perhaps your auto-generated post type names are too verbose.

I wrote a plugin that registered thousands of custom post types in order to answer a question asked on this site, you’ll face major PHP memory and performance issues long before you exhaust the 20 character namespace ( generating and transferring the markup for the admin menu gets problematic after 200, it breaks at a certain point, past 1000 it struggles despite no actual posts in the database for the CPT’s