I think the dumping has been pretty shabby. First off, she makes him homeless and then she apparently decides he is surplus to requirements because he can't get it up.
I agree, except she'd decided he was surplus to requirements a while back, but hadn't had the guts to tell him. I think Toby knew this deep down and that's partly why he couldn't get it up.
Meanwhile - I don't think Lily and Pip will have spent that much time together - obviously they'll have been at family dos, but there's 7 years between them, so it's not like they'd have been going round to each other's house to play or have sleepovers, plus Pip spent a year away around the time Lily would have been becoming a teenager, and there was the Brookfield-Lower Loxley rift following Nigel's fall. They're only just getting to a point where the age gap is going to be less of an issue. And that's probably why Lily is able to think of Pip as amazing, because she just doesn't know. It was clear she wasn't fully aware (yet) of Pip's culpability in the IBR fiasco, for example.