VTY lines are a cisco concept.
The loopback interface controls all traffic to the control plane, that includes management, routing protocols, icmp (to the device), etc.
Your approach is correct but you can do it with less terms and therefore less opportunity for mistake by doing the following:
//Discard all SSH/TELNET except from 10.3.10/24
set firewall filter PROTECT-RE term SSH_TELNET from source-address 10.3.10.0/24 except
set firewall filter PROTECT-RE term SSH_TELNET from protocol tcp
set firewall filter PROTECT-RE term SSH_TELNET from destination-port 23
set firewall filter PROTECT-RE term SSH_TELNET from destination-port 22
set firewall filter PROTECT-RE term SSH_TELNET then discard
set firewall filter PROTECT-RE term else then accept
note the "except" keyword.
Also the 127.0.0.1 address on the loopback is not required.
you can delete the address from the loopback.
family inet filter input can be configured without also configuring an address.
There are additional considerations to make if you are using multiple routing-instances and multiple loopback interfaces.
Also when modifying the loopback interface filter, I suggest you do a commit confirmed since there is a possibility to break management access.