Preparing finite-temperature states in quantum simulators of spin systems, such as trapped ions or Rydberg atoms in optical tweezers, is challenging due to their almost perfect isolation from the environment. Here, we show how finite-temperature observables can be obtained with an algorithm motivated from the Jarzynski equality and equivalent to the one in Lu et al., PRX Quantum 2, 020321 (2021). It consists of classical importance sampling of initial states and a measurement of the Loschmidt echo with a quantum simulator. We use the method as a quantum-inspired classical algorithm and simulate the protocol with matrix product states to analyze the requirements on a quantum simulator. This way, we show that a finite-temperature phase transition in the long-range transverse-field Ising model can be characterized in trapped ion quantum simulators. We propose a concrete measurement protocol for the Loschmidt echo and discuss the influence of measurement noise, dephasing, as well as state preparation and measurement errors. We argue that the algorithm is robust against those imperfections under realistic conditions.