I've just been through this with my 2.4 170 auto... random stalling at low speed and when pulling away, sometimes instant restart, sometimes took a few attempts. Eventually it died outright and couldnt be restarted. Luckily it was on the driveway at the time.
It was a dead 'main engine system relay' (fuse no.1) in my below video. These are just generic Volvo relays you can get on ebay for few quid.