While such things do not rise to 'legend' status, most fighter aircraft with internal guns (20mm Vulcan M61-A'x' standard in USAF) do indeed have the capability to shoot themselves down. Since the projectiles slow down after firing (and begin tumbling after a few thousand feet of travel), 'target fixation' is a real problem for low-experience pilots firing against ground targets.
They forget to stop firing when they 'pull up' from the target. Worse yet, some may continue in a straight line past the target, neglecting to turn away from the projectiles that are (relatively) 'just hanging in the air' waiting to intercept his path.
It wasn't much of a problem flying out of Korat during the Vietnam War, but was a real danger over the ranges of Florida for 'students' in replacement training units at MacDill during that war.
There were quite a few F-4Es that returned with holes that weren't there when they took off. Had they been using something other than TP ball ammunition (a non-explosive round; essentially a lead bullet) they could easily have shot themselves down, when they flew into their own projectiles. (Either fired while pulling up, or a stray ricochet from the ground.)
The physics were different for Air-to-air gun runs against a towed aluminum dart (precluding almost all contact with fired ammo) but the answer is 'Yes". A fighter aircraft could indeed shoot itself down, if the 'stick actuator' badly screws up.
DD - former Msgt, USAF, and career F-4E Weapons Control Systems tech.