namedtuple and dataclasses both use eval(), so if you want to give up eval(), you'd need to give them up, too.
The issue is that it's dynamically generating methods. There has to be a way to get dynamically created code into python for this use case.