You can for a very generic custom function to do that:
import torch
from torch.autograd import Function

class CustomScatter(Function):
    @staticmethod
    def forward(ctx, tensor, devices):
        ctx.inp_device = tensor.device
        outs = tuple(tensor.to(d) for d in devices)
        return outs

    @staticmethod
    def backward(ctx, *grads):
        res = 0.
        for g in grads:
            res += g.to(ctx.inp_device)
        return res, None

torch.manual_seed(123)
a = torch.rand(2, requires_grad=True)
devices = ["cpu", "cpu", "cuda", "cuda"]

all_t = CustomScatter.apply(a, devices)

loss = 0.
for t in all_t:
    loss += a * t.to("cpu")
loss.sum().backward()
print(a.grad)


is latent3backward and latent4backward accumulation order deterministic?

As long as they are “ready to run” (meaning that all their inputs are ready) at the same time and that they ran in the same order during the forward pass yes.