

if i am not wrong, there is only one problem - sum to x (x times)
when we write it in a bit more concise but equivalent notation - d/dx sum_1^x x it basically becomes x^2 again. It is kinda a a=a proof, so not very interesting but that is the only problem. since sum is happening a variable number of times, we can not really let it loose.
in a more reasonable wording - what the image showed was interchanging differentiation and sum (like instead of doing sum after diff, instead of before), and such operations are allowed, but if the sum and diff are independent (not based on same variables).
this interchange works if you used some other variable which is independent of x
this true, but in physics (and in maths too, especially in real analysis), we use differentiation as a equivalent transformation, in a generalised sense. we often come up with ways to define it with something like - finitely many discontinous points or something, which we can iron it. but major problem here (i think) is order of operation - we can not interchange sum and diff when they both depend on x