A man has been jailed for damaging sacred items and committing further offences while in police custody.