Temperatures in Starship’s engines can reach up to 3,000 degrees Celsius, requiring batteries that can withstand intense heat without losing performance.
I'm no rocket scientist but I'd put the batteries somewhere other than in the engines.
Still, they presumably have to operate in vacuum so thermals will be a challenge. The vibration at launch must also be pretty gnarly.