Now, here's the thing,
@LHG100. First, Knights are "only" twenty or thirty feet or so tall under normal circumstances. They're big, tough bastards, true, but not absolutely above the realms of conventional scales of firepower - it's entirely feasible that they can be brought down by a good artillery barrage, or as
@Yennefer and
@Sophrus stated, perhaps an Astartes Devastator squad with the right equipment. Full-fledged Titans are another matter entirely - their Void shields and absurdly thick armour means no handheld weapon can hope to meaningfully damage them, and even concentrated artillery fire would have trouble breaking just one layer of Void shields out of the several that are often installed on a Titan. And those can be brought back online. Realistically, and given the relative lack of Alpha-plus psykers in existence, the only thing able to break a Titan is another Titan, and precious few of those are likely to turn up in battle against even a Space Marine Legion.
Secondly, Knight Houses are attached to the planet they're installed upon. In a sense, their Houses are intended to be their "top-level" organisation, which happens to be lending the machines it owns to the Imperium, wilfully or no; this is not the case with full Titan Legions, these being effectively owned by the Collegia Titanicus, which is in turn a sub-organisation within the Adeptus Mechanicus, and therefore an integral part of the Imperium in a way that Knight Houses are not. In short, it's possible to rule over a Knight planet, and thus control its Knights; try that with a Titan Forge World, and you're liable to get curbstomped by the AdMech for trying to steal their precious machines, probably with same said machines.
And finally, as
@Yennefer has pointed out, large quantities of void ships in a Legion are balanced out by their primary targets being either planets or other void ships, thus letting the weapons shooting at them be powerful enough to hurt them. In conclusion, no Titans attached to or owned by a Legion, please.