UK politicians could be inspired to replicate Donald Trump’s “extreme transparency”, the country’s former top civil servant has said.