Gate-defined wires in twisted bilayer graphene: From electrical detection of intervalley coherence to internally engineered Majorana modes