Yeah I have no idea how to fight Luigi.
Pills stop his WD kind of. Not amazingly, but they offer some disruption. Not a bad way to police how he can come in.
B-throw and d-throw > bair (if they don't DI the throw well) can create good gimps setups. You could probably camp the edge ad constantly go for gimps if you wanted. Once he's offstage, it's not too hard to leverage advantage & cover options to the point where he's forced to recover onstage with an air-dodge or side-B or whatever, which then means free hit for you. Remember that viagra kick is actually really good vs air-dodge sometimes, otherwise try to force him back off with bair (if possible). If he's definitely gonna land onstage and there's nothing you can do about it, hit him with a big move (d-smash, u-smash, fair, f-smash, etc) or throw him back off.
Thing that beats Luigi hardest is a spammable, huge, strong aerial that comes out quickly that he can't really shield-punish or WD OOS on after (Ganon bair, Sheik fair, Falco dair, etc). That and Falcon / Fox's existence. Anyway, bair kind of works for this because it can push him out of range for his crouch-punishes, but its medium priority also opens it up to be cannibalized by his enormous anti-airs (u-smash, u-tilt, every aerial, etc).
In general I think staying on the ground and preventing him from getting the jump on you with a WD approach by whatever means you have (pills, spacing inside his WD but outside his f-tilt & ground attack suite, platform camping even [although Doc's not really built for it]) will probably win you the MU. Luigi can combo you pretty hard for seemingly no reason sometimes.
WD OOS d-smash / grab on his d-smash.
Jab sucks against him. Uair combos that are not tight are likely to incur nair trades. However, nair itself can be punished pretty hard if you bait it so keep that in mind.