I certainly do not have the wheel building experience to really know, but I suspect that if everything was the same, rim, spokes, build quality etc, that a 26 will be a bit stronger because of the shorter spokes. Maybe this is all a myth, but I think not.
I think it will be slightly stronger, but not so much because the spokes are shorter but instead because (1) the length of the rim around the circumference is smaller and the spokes at the rim are closer to each other and (2) the hub would have the same width, thus teh flanges are the same distance apart, so the angle between the drive side and non-drive side spokes at the rim would be slightly greater. You said "everything was the same" so here I did not make a distinction between 130 and 135mm hubs.
Rohloff used to argue that you only needed 32 spokes because their hub flanges were so far apart which increased that spoke angle. (They also made the point that the wheel was not dished.) But they eventually built a 36 spoke hub which is the one I bought.
You could argue that a longer spoke might make it stronger because the longer spoke would offer a bit more cushioning (like a longer spring) when the wheel hits something like a pot hole. Here I am using the same logic that supports double butted spokes with a thinner middle section.
But in the big picture, both wheels are so close to the same size, I think the difference in strength is so minor that other factors are more important to deciding what wheel size you want.
Regarding that Rohloff argument about the flanges being farther apart, I recall someone used the same logic to say if you are using an SP front hub which has very close flanges that you should use more spokes, they were suggesting four more spokes on an SP wheel than you would otherwise use on for example a Shimano dynohub wheel. I think that makes some sense, although I am clearly going off topic here.