well if pk freeze is the issue, I don't think the character matchup is why you're losing.
I main Lucas and there are a couple things that get to me. The guy I go against arrow spams, for one thing. I know most of you are thinking how that's dumb since I'll just absorb but he moves forward with each one. Even if I absorb one or two, he can mix up whether he'll throw another arrow or attack as he gets close enough. Basically, I'm saying that mid-ranged arrows give you a large advantage even if I get like 8-16% back. Most Lucas's will flinch when you get close and drop their magnet (watch out, it has like no ending lag so don't be nubbish and dash attack. you might even die trying since the magnet has knockback). I got a harsh lesson in this when I dropped my magnet and got hit by a point blank arrow to grab/f-smash.
Next, forward-b is kind of nasty against Lucas. The thing is, you have to space it. If you do it too close so you're still advancing when you get to the Lucas, he can smash di behind you and that's your ***. If you space it so you stop in front of him, he's forced to 1) Block it, in which case he can't shieldgrab out of it because Lucas leans forward. He can't move without getting hit so he's forced to take a couple hits and di out. 2) Take the hit and di out. You obviously have to not make this your most common approach because its punishable if the Lucas anticipates it and counter spaces but it wrecks stationary Lucas's and can make them rethink predictable SH pk fires.
Don't just let them tether recovery easily. When pressing A after he rope snakes, Lucas closes the gap and sweetspots the ledge. But you can hit him as he's doing this. The Pit I go against d-tilts me when I rope snake. It catches me just before I get invincibility (I've never seen this happen to Olimar so maybe Lucas just has a weird tether).
Mess with the Up-B. Don't just let him do it. Forward-air, back-air, if he has no jump and is too far to tether, he's gonna do it. Just make sure to space so you don't get forward air-ed by a smart Lucas. You have enough time to wait for him to start it and move in to punish it.
This next part is referring to when Lucas is on the ground at like 100% and you just died. Don't go for blatant back airs when you neeeed that kill, especially when you're shffl'ing it in a very unsafe shieldgrabbable way. it's pretty predictable and is just gonna get you smashed out of shield. Alot of this game is not getting super aggressive when you need to tie up the game. You have a safe character so don't be nubbish and f-smash/bair too close to the ground praying it'll hit when he's clearly camping. You will be rope snaked/smashed out of shield. Be patient and stay close.
Main thing: Don't let good Lucases approach. A good Lucas on the aggressive is going to be veeeery hard to deal with. You outrange him, make him understand that. If he's pk firing and you're blocking it, you need to be thinking about how to get out of that situation. If he's nairing and you're blocking it, you need to think about why you got put in that situation and not let it happen again because if your shield is getting naired, you will be taking a hit in the next .5-3 seconds.
While maintaining the pace, also make sure not to think that since you have a sword, you outprioritize Lucas. You will be ashamed as he easily plows through your attacks. His jab clanks with your f-smash, his smashes kill you early and his f-air (look for this move, its a straight kick and is laggy unless done at the top of his short hop. If he does it low, shield grab it. If he does it high, run in and punish it) plows through anything he predicts. Don't attack from below him, you will get d-aired. Instead, bait it and punish it. Most Lucases are very confident in their dair and general priority. Random Note: Do not attack a standing Lucas on a platform from below. His u-smash and d-smash will hit you before your uair hits him and you will probably die from it.
Personally, I think Lucas should win this match but I lose consistently to my friend's Pit. Good luck.