Diffraction is a property of a waveform as it encounters an obstacle/barrier. So yes it’s due to the aperture and the amount of enlargement of the capture. So the sensor size itself is not responsible, but the amount of enlargement to achieve a specific print size and the viewing distance of the print. It’s similar to DOF in that regard. Again assuming an 8x10 print viewed at 18 inches, a DX sensor needs a 13 times enlargement to achieve that size and would show diffraction after about f/11. An FX sensor needs about 8 times enlargement and would show diffraction after about f/16. But again that assumes a specific enlargement at a specific viewing distance. If you crop then enlarge or view the print closer than what’s considered a normal distance, you will need a larger aperture to avoid diffraction affects.
Also the softness due to diffraction can be mitigated to an extent by a sharpening process known as de-convolution. But while de-convolution can improve the appearance of relative sharpness, it cannot recover fine detail that was lost to diffraction.