If you remove the chime, you'll have to replace it with a resistor that will cause enough current to flow that the voltage across the shunt resistor will turn on the optocoupler
Aren't those basically the two 10k resistors I have near the optocoupler?
In the simplest form an old school doorbell is just a transformer, chime, and push button in series. When you press the button it closes the circuit and current goes through the chime.
Lighted buttons have a bulb in parallel with the switch. So how does the bulb light up? The answer is that it gets power through the chime. The bulb has some resistance, I don't know how much, but it's enough to limit the current through the chime so that the chime isn't constantly energized. When you press the button it shorts the bulb and allows a large current to energize the chime and make it ring. Notice how the bulb goes out when you press the button? That's not a user interface feature; it's a consequence of how the bulb is wired up.
When you removed the chime you removed the source of power to the bulb. When you added the optocoupler you provided a different path for current to light the bulb, but it has 2x10k resistance plus the LED(s) in the optocoupler, all in series with the bulb. That's why the bulb is so dim.
To restore the brightness of the light, you could replace the chime in the circuit with a resistor. Use your DMM to measure the resistance of the chime. It's probably in the neighborhood of 10 to 50 ohms. For the sake of discussion, let's assume it's 12 ohms. OK, suppose you wire the resistor into the circuit where the chime was. When the button isn't pressed it supplies current to the bulb. When the button is pressed it has 12V across it. That means there will be 1A of current going through it and it will dissipate 12W of power! So you would need a really big power resistor.
One reasonable option is to leave the chime wired up, but remove some part of it so that it doesn't make any noise. Removing the plunger comes to mind. That's the part that flies out and hits one of the bells when energized, then flies back and hits the other bell when power is removed. You could also remove the bells. In the that case the plunger might fall out anyway.
Another solution is to modify a lighted button to work on a lower voltage, ideally 3.3V or a little less. As already noted, most lighted doorbell buttons use an incandescent bulb that requires 12V to 20V, but you can replace that with a LED. You can buy LEDs with 3.1V forward voltage drop, then you don't even need to add a current limiting resistor, but they tend to be bright and directional.
This one would probably work, though I haven't tried it.
I've added photos of a new (but very inexpensive) button that I happened to have and disassembled. Notice that it uses a single sided PCB and a bulb with leads. I could easily remove the bulb and replace it with a common 3mm LED. If a current limiting resistor is needed, I would cut a narrow slot across one of the two traces, scratch away some of the solder mask around the slot, then solder in a surface mount resistor across it. You could do something similar with a leaded resistor.
Now, with the addition of a pull-up resistor, you can use the button directly as shown below. The pull-up resistor and the current limiting resistor need to be sized carefully so that there is no more than 3.3V at the GPIO pin when the button isn't pressed. Your ESP32 might be destroyed if you apply more than 3.3V to any of its pins. In the diagram below, I show a 100 ohm pullup to drop 1.8V with 18mA. If you pull up to something other than 5V then you would need a different size resistor. The size of the current limiting resistor depends on the forward voltage drop of the LED and the amount of current you want to pass through it.