The fraud isn’t what he’s being punished for.

The ongoing refusal to answer questions under oath is.

He could have agreed to talk anytime and been released shortly.

I understand being in contempt for not answering a question generally, but I'm curious how this doesn't fall under 5th amendment protections.

IANAL

It's a civil proceeding not a criminal proceeding so he would not be incriminating himself.

He could argue that by answering he would be admitting crimes and opening himself to criminal liability. But there's a possibly they give him immunity and that route is taken away.

IANAL either but I'm not sure anyone involved in the civil case would have the power or authority to grant criminal immunity (perhaps up to and including the judge, at least local to me the civil judges do not do criminal cases - there is no overlap).

It sure would be nice if this standard of conduct in court were also upheld for the US federal officials who refuse to answer or straight up bold faced lie in court. But nah, it only ever happens to normal people.