Hello Komountain
1) "After eating lunch, my bike was fixed." - you're correct: this sentence is wrong, and suggests that the bike had eaten lunch, which only happens in Polish cartoons.
(2) "After eating lunch, I fixed my bike." - you're right: 'eating' relates to 'I'.
(3) "By inserting...