One problem with lucario is just that sonic can't kill very easily, so lucario will have a high percentage giving him stronger attacks to kill sonic off, and then continue to rack up damage quickly after sonic respawns. So he will always have an advantage when he has high percentage, I know it may seem a bit obvious, but try to KO lucario before he KOes you that way when he respawns his attacks will be a lot less powerful and won't kill quite as fast.....but setting up for a kill and executing it isn't exactly easy. Go for something that he won't see coming, or can't punish as easily. I'm not totally sure, but maybe an offstage kill would be safer than on stage? Perhaps a b-air stage spike as he up Bs into the ledge.
Also if you can, when he fully charges up his Aura Sphere, bait him into releasing it with spin fakeouts if possible. The aura sphere can be pretty deadly when it hits, so its good to have it not be ready to go when he sees you in a good position to use it. Only problem is that he can just as quickly recharge it.
Another thing that is a concern is just his low lag aerials, since they are difficult to punish, I am not 100% sure but maybe punishing his ground attack's lag would be a better option.
And I don't know this, but does Sonic's Uair go through Lucario's Dair? Much appreciated if someone can answer that. Same thing with Sonic's fair going through Lucario's Fair as well.