Rock star who co-wrote, produced Demi Lovato’s ‘Scream’ single: “It’s a lot of fun working with a superhero”