I am just going to be fairly blunt right up front. Exactly what you described should be a losing strategy for Pit. You just need to build up your skills in a few areas to combat those few traits the Pit used.
Unfortunately, I have to make a few assumptions. I will assume the pit you were playing was simply firing arrows by mashing the B button. As in the player was not observing how you were reacting to the arrows. In that case, it makes it easier to get past arrows. For one, dash and time a shield to power shield the arrow. The idea is that a person literally mashing/spamming arrows has routine rhythm for you to match your dash -> powershield -> dash powershield until you close the distance.
Now, suppose you run into the situation where you close the distance and the pit tries to Fsmash/Dsmash. Again, I am going to assume your pit player does not adjust his play accordingly and tries the same thing over and over. So, you can dash -> powershield to close the distance, then literally shield waiting for a Fsmash or Dsmash. After it makes contact you do have enough time to grab, or drop shield & Ftilt/Utilt/DashAttack.
Assuming the pit plays exactly as you described this is the simplest strategy to beat arrows and fsmash/dsmash pit that does not adjust their gameplay according to what you do. It becomes a bit more complicated after you succeed in doing this multiple times and the pit becomes scared anytime you get close and changes up how they react. Or they might start charging arrows to mess up your dash -> powershield timing. In which case, you can no longer purely rely upon predicting their actions. If the pit catches on and says spams arrows and starts to grab whenever you get close to just sit in shield you need to change up your strategy at that point.
In general, I will summarize by saying that you should practice powershielding projectiles and watching your opponents actions. The last part of paying attention to your opponent helps immensely in watching for start-up animations of projectiles and helps you better react to them with powershields.
Alternatively, you could attempt to play the camp game. This still requires you to pay attention to your opponent to look for moments when you need to powershield to avoid getting hit. But, you also have to juggle the proper timing for picking up nades, pulling nades, and throwing nades all between arrows being thrown at you and when you need to powershield. For simple play-styles like what you described I think its simply, easier, and more rewarding to close the distance and hit with a grab/Ftilt.