5 inches?...you cutting it close, if not for the most part, some part of that motor is touching water......
dryer motors are usually attached to the base, lucky if there is an inch of clearance underneath......
FL motors are usually attached to the drum unit, may be a bit higher up, but rather still close to the bottom....unless its direct drive.....
sorry to hear your going through all of this......
too late for it now.....but when you get through all of this, consider the drawers for these units, placing up on cinder blocks, or building a platform to keep them off the floor......
not a bad idea for heaters and water heaters if this turns into a common concern for the future....
if a gas burner comes in contact with water, the unit is usually tossed out....
keep us posted as you can......stay safe