For future reference, the answer was yes, it's fine to accept the prompt and install libvips42t64 and its dependencies. So, to switch from ImageMagick to libvips on Ubuntu, just do:
sudo apt install libvips42
Then add
MASTODON_USE_LIBVIPS=true
to .env.production, and restart the Mastodon services.